WebService Remote Debugging Enabled

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.