Webservice remote debugging and timeout operation principle analysis

Webservice remote debugging and timeout operation principle analysis

WebService Remote Debugging

In .NET, the remote debugging function of WEBSERVICE is turned off by default. Sometimes when we need to debug the program remotely, we need to turn on this function. We only need to add a configuration under the <system.web> configuration section of web.config in the WEBSERVICE project. 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>

WebService Timeout Operation

It takes a long time to execute some WebService methods. When the default time is exceeded, the system will report an error. At this time, you can do the following:

1. Modify the app.config file and add the following code:

<httpRuntime executionTimeout="600" />

The request execution timeout is 600 seconds (the default is 110 seconds)

2. Set the Timeout property of Web services

The 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; the unit is milliseconds

Indicates the amount of time, in milliseconds, that an XML Web service client waits for a synchronous XML Web service request to complete.

Tip: If you set the Timeout property to Timeout.Infinite (=-1), it indicates that the request has no timeout. Even though an XML Web service client can set the Timeout property to no timeout, the Web server can still time out the request on the server side.

The system will use the minimum of the above two settings as the operation timeout period.

IIS limits web service request size and timeout

The default request size must not exceed 2M. To reset it: In web.config,

<httpRuntime executionTimeout="600" maxRqeustLength="32768"/>

At the same time, the IIS Default Web Site control interface can set "Connection timeout", the default value is 120 seconds.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Python suds access webservice service implementation
  • Python3 webservice interface test code detailed explanation
  • Implementation of creating WebService service in vs2019
  • How to integrate WebService using CXF in SpringBoot
  • Java parses the XML string returned by calling webservice
  • Two examples of Java calling CXF WebService interface
  • How to use suds to call webservice interface in python
  • Perfect solution to the cross-domain problem of API and WebService

<<:  Detailed explanation of moment.js time and date processing

>>:  Detailed explanation of several practical solutions for quickly deleting large amounts of data (tens of millions) in MySQL

Recommend

Detailed explanation of the principle of Vue monitoring data

Table of contents 1. Introduction II. Monitoring ...

Detailed explanation of samba folder sharing server configuration under centos

1. Introduction Recently I found that there are m...

Mysql uses stored procedures to quickly add millions of data sample code

Preface In order to reflect the difference betwee...

Example of setting up a whitelist in Nginx using the geo module

Original configuration: http { ...... limit_conn_...

MySQL5.6.31 winx64.zip installation and configuration tutorial

#1. Download # #2. Unzip to local and modify nece...

Detailed explanation of VUE responsiveness principle

Table of contents 1. Responsive principle foundat...

Vue uses Amap to realize city positioning

This article shares the specific code of Vue usin...

Detailed explanation of the knowledge points of using TEXT/BLOB types in MySQL

1. The difference between TEXT and BLOB The only ...

mysql-8.0.16 winx64 latest installation tutorial with pictures and text

I just started learning about databases recently....

XHTML Basic 1.1, a mobile web markup language recommended by W3C

W3C recently released two standards, namely "...

XHTML 1.0 Reference

Arrange by functionNN : Indicates which earlier ve...

JavaScript to implement a simple clock

This article example shares the specific code for...

Steps for Docker to build its own local image repository

1. Environment and preparation 1. Ubuntu 14.04 2....