.NET Web Service (asmx) Timeout Problem

倖福魔咒の 提交于 2019-12-05 09:04:33

Firstly: See Steven Cheng[MSFT] response here about timeouts. There is a execution timeout you can set for httpRuntime. He says something interesting after that, which is "Also, make sure that you've set the 'compilation debug="false"' as to make the timeout work correctly"

Besides the fact that something may be terribly wrong on their end (or the data returned is so voluminous/ I'm not going to judge - might be a good reason), have you tried calling their operation Asynchronously? Same results? I guess it would take an hour

YourVendor.WebService ws = new YourVendor.WebService();
ws.LongRunningOperationCompleted += new YourVendor.LongRunningOperationEventHandler(ws_LongRunningOperationCompleted);

ws.LongRunningOperationAsync();

// Implement the ws_LongRunningOperationCompleted handler (stub will auto generate)

The completed event handler will have a specific event args param, which will contain the results, for event args e, e.Result should have what you need when it completes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!