【发布时间】:2013-03-05 23:44:17
【问题描述】:
我有一个 .NET 4.0 集成模式的 Web 应用程序,通过 localhost 在同一台服务器上以 .NET 2.0 集成模式调用 Web 服务 (ASMX)。
10 次中有 9 次都可以正常工作,但有时 Web 应用程序会在调用期间出现“请求超时”和“线程被中止”错误。它在此代码示例的最后一行给出了错误:
Dim Service As New localhost.Service
Dim Input As New localhost.InputProduct
Dim Ret As New localhost.OutputProduct
Try
Ret = Service.RequestProduct(Input)
Catch
Finally
Service.Dispose()
If Ret.succesfull = True Then
If Response.IsClientConnected = True Then
Response.Redirect("success.aspx", False)
End If
End If
End Try
在 web 服务的日志文件中,我得到一个 sc-win32-status: 995 和一个 sc-status: 200,通常花费的时间总是超过 60 秒(花费时间:62743) .通常这需要 14 秒才能完成而不会出现错误。
在单击按钮后,在 ASPX 页面后面的代码中进行调用。 页面上有一个Updatepanel,按钮用作PostBackTrigger。
问题:为什么我在调用 Web 服务后会收到这些“请求超时”错误?
服务器:
- Windows Server 2008 R2 SP1
- IIS 7.5
- Microsoft UrlScan 3.1
- Windows 防火墙
【问题讨论】:
-
我添加了这个问题,更准确地说。我在 IIS 中尝试了很多不同的设置,但似乎没有任何效果。我希望能知道在哪里可以找到解决方案。
标签: web-services .net-4.0 web-config iis-7.5 ajaxcontroltoolkit