Asp.net webService Remote Access Error Solution
<WebServices>
<Protocols>
<Add name = "HttpSoap"/>
<Add name = "HttpPost"/>
<Add name = "HttpGet"/>
<Add name = "Documentation"/>
</Protocols>
</WebServices>
If you want to call the service remotely, You need to modify web. config and add the following section under the system. web section.
Other netizens encountered problems
Requests are sent from the page to the data presentation layer. The request data of the presentation layer is sent to the WebService Service service layer. After simple processing, the WebService requests data to the business layer and data access layer.
However, an exception occurs when I save an article with an attachment. The program layers are completely normal. I really don't know why ..
An error occurred while saving the data: data presentation layer exception: Remote Access Error! System. Web. Services. Protocols. SoapException: An exception occurs when you run the specified extension in the configuration file. ---> System. Web. HttpException: exceeds the maximum request length. At System. web. httpRequest. getEntireRawContent () at System. web. httpRequest. get_InputStream () at System. web. services. protocols. soapServerProtocol. initialize () --- end of the internal exception stack trace --- at System. web. services. protocols. soapServerProtocol. initialize () at System. web. services. protocols. serverProtocol. setContext (Type type, HttpContext context, HttpRequest request, HttpResponse response) at System. web. services. protocols. serverProtocolFactory. create (Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean & abortProcessing)
Solution
WebService refers to the asp tutorial. net program. Your problem should be that the attachment is larger than 4 MB, causing overflow.
Add the httpRuntime configuration section to the configuration file to change the size of maxRequestLength. The default value is 4000, which indicates 4 m.
<Configuration>
<System. web>
& Lt; httpRuntime maxRequestLength = "4000"
UseFullyQualifiedRedirectUrl = "true"
ExecutionTimeout = "45"
VersionHeader = "1.1.4128"/>
</System. web>
</Configuration