为什么我收到连接中止消息?

发布于 2024-08-17 14:55:08 字数 2422 浏览 6 评论 0原文

我有一个 Web 表单,它使用来自 http://www.xml- 的库将数据发送到第三方服务rpc.net

最近表单开始抛出异常。我尝试在 web.config 中启用跟踪来查看来回传输的数据,但这似乎解决了问题,或者至少阻止了抛出异常。

有什么想法可能会发生什么,或者我如何在不明显解决问题的情况下诊断这个问题?

跟踪代码:

    <system.diagnostics>
    <trace autoflush="true" />
    <sources>
        <source name="System.Net">
            <listeners>
                <add name="WebPageTraceListener"
                    type="System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            </listeners>
        </source>
    </sources>
    <switches>
        <add name="System.Net" value="Verbose" />
    </switches>
</system.diagnostics>

异常消息:

System.Net.Sockets.SocketException:已建立的连接被主机中的软件中止 [SocketException (0x2745): 已建立的连接被主机中的软件中止] System.Net.Sockets.Socket.Receive(Byte []缓冲区,Int32偏移量,Int32大小,SocketFlags socketFlags)+73 System.Net.Sockets.NetworkStream.Read(Byte[] 缓冲区, Int32 偏移量, Int32 大小) +131 [IOException:无法从传输连接读取数据:已建立的连接被主机中的软件中止。] System.Net.ConnectStream.Read(Byte[]缓冲区,Int32偏移量,Int32大小)+313 System.Xml.XmlTextReaderImpl.ReadData() +444 System.Xml.XmlTextReaderImpl.EatWhitespaces(BufferBuilder sb) +285 System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +74 System.Xml.XmlTextReaderImpl.ParseDocumentContent() +187 System.Xml.XmlTextReaderImpl.Read() +151 System.Xml.XmlLoader.LoadDocSequence(XmlDocumentparentDoc)+48 System.Xml.XmlLoader.Load(XmlDocument 文档,XmlReader 阅读器,布尔保留空白)+129 System.Xml.XmlDocument.Load(XmlReader阅读器)+108 System.Xml.XmlDocument.Load(Stream inStream) +91 CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(流stm,类型svcType)+189 [XmlRpcIllFormedXmlException:来自服务器的响应不包含有效的 XML。] CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(流stm,类型svcType)+238 CookComputing.XmlRpc.XmlRpcClientProtocol.ReadResponse(XmlRpcRequest req,WebResponse webResp,流respStm,类型returnType)+111 CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(对象 clientObj,MethodInfo mi,Object[] 参数)+762 CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(MethodInfo mi,Object []参数)+11 XmlRpcProxyfd5eb8e7-d547-4544-bd38-7d6dc1366a49.login(字符串用户名,字符串密码)+120

I have a web form that is sending data to a third party service using this library from http://www.xml-rpc.net.

Recently the form has started to throw exceptions. I have tried enabling trace in the web.config to see what data is going back and forth, but this seems to fix the problem, or at least stop the exception being thrown.

Any ideas what could be happening, or how I can diagnose this without apparently fixing the problem?

The trace code:

    <system.diagnostics>
    <trace autoflush="true" />
    <sources>
        <source name="System.Net">
            <listeners>
                <add name="WebPageTraceListener"
                    type="System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            </listeners>
        </source>
    </sources>
    <switches>
        <add name="System.Net" value="Verbose" />
    </switches>
</system.diagnostics>

The exception message:

System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
[SocketException (0x2745): An established connection was aborted by the software in your host machine]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +73
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +131
[IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.]
System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size) +313
System.Xml.XmlTextReaderImpl.ReadData() +444
System.Xml.XmlTextReaderImpl.EatWhitespaces(BufferBuilder sb) +285
System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +74
System.Xml.XmlTextReaderImpl.ParseDocumentContent() +187
System.Xml.XmlTextReaderImpl.Read() +151
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +48
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +129
System.Xml.XmlDocument.Load(XmlReader reader) +108
System.Xml.XmlDocument.Load(Stream inStream) +91
CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(Stream stm, Type svcType) +189
[XmlRpcIllFormedXmlException: Response from server does not contain valid XML.]
CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(Stream stm, Type svcType) +238
CookComputing.XmlRpc.XmlRpcClientProtocol.ReadResponse(XmlRpcRequest req, WebResponse webResp, Stream respStm, Type returnType) +111
CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(Object clientObj, MethodInfo mi, Object[] parameters) +762
CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(MethodInfo mi, Object[] Parameters) +11
XmlRpcProxyfd5eb8e7-d547-4544-bd38-7d6dc1366a49.login(String username, String password) +120

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半暖夏伤 2024-08-24 14:55:08

我认为关键可能在底部附近:

+129 System.Xml.XmlDocument.Load(XmlReader reader) +108 System.Xml.XmlDocument.Load(Stream inStream) +91 CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(Stream stm, Type svcType) +189 [XmlRpcIllFormedXmlException: Response from server does not contain valid XML.]

您的远程服务器正在响应无效的 xml 文档,并且看起来您的连接因此而中断。

I think that the key may be near the bottom:

+129 System.Xml.XmlDocument.Load(XmlReader reader) +108 System.Xml.XmlDocument.Load(Stream inStream) +91 CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(Stream stm, Type svcType) +189 [XmlRpcIllFormedXmlException: Response from server does not contain valid XML.]

Your remote server is responding with an invalid xml document, and it looks like your connection is dying because of it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文