The remote debugging feature of WebService has been turned off by default in. NET, and sometimes we need to open this function when we want to debug the program remotely, we just need to add the Web. config <system.web> in the WebService project Configure section below add a configuration on OK, the code is as follows:
<system.web>
<compilation debug= "true"/>
<webServices>
<protocols>
<add name= "HttpSoap"/>
<add name= "HttpPost"/>
<add name= "HttpGet"/>
<add name= "Documentation"/>
</protocols>
</webServices>
</system.web>
Second, WebService timeout operation
It takes a long time to execute some of the WebService methods, and the system will get an error if it exceeds the system default length of time. This can be done as follows:
1. Modify the app. Config file to add the following code:
Request execution time-out is 600 seconds (default is 110 seconds)
2. Set the Timeout property for Web Services
Timeout, in milliseconds, for synchronous calls to XML Web services. The default is 100000 milliseconds.
Webservicetest.service1 src = new TestWinApp.WebServiceTest.Service1 ();
Src. URL = Txtaddress.text;
Src. Timeout = -1;//1120 * 1000; Unit is milliseconds
Indicates the time, in milliseconds, that an XML Web services client waits for a synchronization XML Web services request to complete.
Tip: If you set the Timeout property to Timeout.infinite (=-1), it indicates that the request has no time-out. Even if the XML Web Services client can set the Timeout property to no time-out, the Web server can still make the request time-out on the server side.
The system takes the minimum of the above two settings as the length of time that the operation times out.
IIS restrictions on the size and timeout of Web service requests
The default request size must not exceed 2M, reset the method: in Web. config,
At the same time, the IIS default Web site Control interface can be set to "Connection timeout", the default value is 120 seconds.
WebService Remote Debugging Enabled