web-services - IIS 7.5 抛出 sc-win32-status : 995 after 60 seconds on web service (ASMX) request

标签 web-services .net-4.0 web-config iis-7.5 ajaxcontroltoolkit

我有一个 .NET 4.0 集成模式下的 Web 应用程序,通过本地主机在同一服务器上调用 .NET 2.0 集成模式下的 Web 服务 (ASMX)。

十分之九的情况都工作正常,但偶尔 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
  • 微软 UrlScan 3.1
  • Windows 防火墙

最佳答案

我终于找到了这个问题的答案。原来是web.config中的这段代码:

<pages smartNavigation="true">

关闭此功能后,我不再收到任何超时错误。 超时的原因可能是 IE 浏览器中 smartNavigation 设置生成的 IFRAME(而不是 Firefox/Chrome)

我已在 .NET 2.0 中使用此设置 eliminating the flash caused by navigation ,升级到 .NET 4.0 后,Visual Studio 没有提供任何线索表明此设置已被弃用。

我找到了答案,因为我还有其他问题需要处理。使用最新的ajaxToolkit后对于 .NET 4.0,我在使用 AutoCompleteExtender 时在 IE7/8 中遇到了以下 javascript 警报错误:

Stack overflow at line: 0

这与 smartNavigation 设置有关。因此,删除此设置同时解决了两个问题。希望我能帮助别人解决这个问题,因为对我来说,这是我在互联网的短暂历史中发现的最烦人的错误之一。

关于web-services - IIS 7.5 抛出 sc-win32-status : 995 after 60 seconds on web service (ASMX) request,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13032748/

相关文章:

java - 如何在没有 Servlet 的情况下在 Restful Web 服务(Java 和 Jersey)中获取客户端证书?

eclipse - Apache CXF 配置 : Failed to import bean definitions from URL location

c# - 文档错误或 .NET 中的错误

c# - 在默认浏览器中重定向到 http 页面的 winforms 应用程序中的链接

c# - ToolStripTextBox 延迟 TextChanged

web-config - Web.Config 转换 XPath

java - Jersey 2 过滤器在客户端请求过滤器中使用容器请求上下文

web-services - 在 Web 服务中使用 Code First 时出错 "System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string."

msbuild - Web.config 转换 - 周围元素

c# - MSDeploy - 允许参数在 parameters.xml 中是可选的/为空的