Partilhar via


Error: Timeout While Debugging Web Services

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

When you are stepping into an XML Web service from calling code, the call may sometimes time out, with the result being that you cannot continue debugging. You may see an error message such as this.

An unhandled exception of type 'System.Net.WebException' occurred in
system.Web.services.dll
Additional information: The operation has timed-out.

Solution

To avoid this problem, set the timeout value for the call to the XML Web service to infinite, as shown in this example:

Service1 obj = new Service1();
obj.TimeOut = -1; // infinite time out.

See also