gpt4 book ai didi

asp.net - 什么会在一台服务器上导致此错误,而不是另一台服务器?

转载 作者:行者123 更新时间:2023-12-04 19:12:04 25 4
gpt4 key购买 nike

我们有一个连接到外部 Web 服务的 ASP.Net 网站,几天前它突然停止工作。

基本代码是这样的:

Try
request = New ExternalWebService.ProcessRequestService

' Error occurs here:
response = request.processCommand(parameters)

' Do some other stuff with response here

Catch webEx As System.Net.WebException

' This triggers and generic error gets displayed

Catch ex As Exception

Finally

End Try
System.Net.WebExceptionSendFailure 触发异常,并返回此堆栈跟踪:

基础连接已关闭:发送时发生意外错误。 ——
在 System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest 请求)
在 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest 请求)
在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
在 ExternalWebService.ProcessRequestService.processCommand(parameters)

当我尝试在我的开发机器上调试这个问题时,它工作正常,没有发生异常。

我们的网络服务器最近没有更新,我可以使用 FireFox 从网络服务器连接到 wsdl 服务(但是我无法连接 IE,但这可能与我们在网络服务器上使用 IE 的另一个问题有关)

我已经尝试了为错误消息 #2 发布的所有解决方案 here ,包括设置 KeepAlive = FalseServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 ,但是没有人努力解决这个问题。

我们的网络服务器运行 Windows Server 2003 和 IIS6.0

什么会导致此错误发生在一台机器上,而不是另一台机器上?

编辑:这是跟踪信息:

System.Web.Services.Asmx 信息:0:调用 XmlSerializer [创建 XmlSerializer]
方法:System.Xml.Serialization.XmlSerializer#1669721556::FromMappings(System.Xml.Serialization.XmlMapping[]#4002219=[4], ExternalWebService.ProcessRequestService#93032588=ExternalWebService.ProcessRequestService)
调用方:System.Web.Services.Protocols.SoapClientType#42808772::.ctor(ExternalWebService.ProcessRequestService#93032588=ExternalWebService.ProcessRequestService)
进程 ID=2796
逻辑操作栈=
线程 ID=14
日期时间=2012-12-21T17:02:39.2826250Z
时间戳=61755143048799345
System.Web.Services.Asmx 信息:0:从 XmlSerializer 返回 [创建 XmlSerializer]
调用方:System.Web.Services.Protocols.SoapClientType#42808772::.ctor(ExternalWebService.ProcessRequestService#93032588=ExternalWebService.ProcessRequestService)
进程 ID=2796
逻辑操作栈=
线程 ID=14
日期时间=2012-12-21T17:02:39.6576250Z
时间戳=61755144323396760
System.Web.Services.Asmx 信息:0:调用 XmlSerializer [写请求]
方法:Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer#1231684::Serialize(System.Xml.XmlTextWriter#8023888=.., System.Object[]#19695157=[40], (null), (null))
调用方:ExternalWebService.ProcessRequestService#60553900::Serialize()
进程 ID=2796
逻辑操作栈=
线程 ID=14
日期时间=2012-12-21T17:02:39.7357500Z
时间戳=61755144598320131
System.Web.Services.Asmx 信息:0:从 XmlSerializer 返回 [写请求]
调用方:ExternalWebService.ProcessRequestService#60553900::Serialize()
进程 ID=2796
逻辑操作栈=
线程 ID=14
日期时间=2012-12-21T17:02:39.7357500Z
时间戳=61755144621621529
System.Web.Services.Asmx 信息:0:调用 WebRequest.GetResponse
方法:System.Net.HttpWebRequest#2800407::GetResponse()
调用方:ExternalWebService.ProcessRequestService#60553900::GetWebResponse()
进程 ID=2796
逻辑操作栈=
线程 ID=14
日期时间=2012-12-21T17:02:39.7357500Z
时间戳=61755144622114240

最佳答案

显然,在我的特殊情况下,这是因为 Web 服务供应商提高了他们的安全性,而我们的 Web 服务器没有解密连接所需的正确库。

我们唯一的线索是一个 ID 为 36874 的系统事件查看器条目和几天前我们网站停止工作的同一天的 Schannel 源,它说:

An SSL connection request was received from a remote client application, but none of the cipher suites supported by the client application are supported by the server. The SSL connection request has failed.



但是,如果您自己调试此问题, this link非常有用,因为它对错误进行了一些简化的描述,为我指明了正确的方向,我的问题与无法连接到他们的 Web 服务有关。

The underlying connection was closed: An unexpected error occurred on a send

This problem occurs when the client computer cannot send an HTTP request. The client computer cannot send the HTTP request because the connection has been closed or is unavailable. Lookup the error in this article http://support.microsoft.com/kb/915599.



并且链接的 Microsoft 支持页面也相当详细地介绍了一些不同的解决方案,您可以尝试解决此问题的最常见原因。

关于asp.net - 什么会在一台服务器上导致此错误,而不是另一台服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13993703/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com