开发者

Increasing timeout of ASMX webservices

开发者 https://www.devze.com 2023-03-15 16:03 出处:网络
I am running an ASMX webservice on IIS 7. The client is a silverlight application. I am issuing several asynchronous file requests to the webservice and pr开发者_开发问答ocessing them on AsyncComplete

I am running an ASMX webservice on IIS 7. The client is a silverlight application. I am issuing several asynchronous file requests to the webservice and pr开发者_开发问答ocessing them on AsyncCompleted. Sometime after all the async requests have been issued, I get the following timeout message. How can the timeout be increased.

I tried adding the following in the web.config of the ASP.NET project that is hosting my silverlight application.

<httpRuntime executionTimeout="12000"/>

(This timeout is not happening when I do the requests synchronously, but synchronous operations are very slow.)

The HTTP request to 'http://localhost:5080/Service1.asmx' has exceeded the
allotted timeout. 


See these sources:

  • Timeout error in WCF
  • Silverlight Timeout Issues from WCF… exceeded the allotted timeout.


Because this is the silverlight application i am in a doubt if my suggestion will work. Just try, to create the object of the webservice and then increase the time out value to what ever seconds you want. Below code may be helpful

 ConsoleApplicationFor2Groups.AdServices.ADService adser = new ADService();
 adser.Timeout = 100000; // this time is in milliseconds

Just let me know if this works.

0

精彩评论

暂无评论...
验证码 换一张
取 消