Windows应用程序和Web服务之间的连接错误 [英] error in connection between a windows application and web service

查看:115
本文介绍了Windows应用程序和Web服务之间的连接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在Windows应用程序和Web服务之间的连接有这个错误:

(在某些电脑中没有任何问题)

System.InvalidOperationException:响应不是格式良好的XML。 ---> System.Xml.XmlException:根级别的数据无效。第1行,第2位。

在System.Xml.XmlTextReaderImpl.Throw(例外e)

在System.Xml.XmlTextReaderImpl.Throw(String res,String arg)< System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
在System.Xml.Xml.XmlTextReaderImpl.ParseDocumentContent()上的
在System.Xml.XmlTextReaderImpl中的
。阅读()

在System.Xml.XmlTextReader.Read()

在System.Xml.XmlReader.MoveToContent()

在System。 Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage消息,WebResponse响应,Stream responseStream,布尔asyncCall)

在System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object []参数)

---内部异常堆栈跟踪结束---

在System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object []参数)

Hi,
I have this Error in connection between a windows application and web service:
(in some pc a haven't any problem)
System.InvalidOperationException: Response is not well-formed XML. ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 2.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

推荐答案

你有什么机会回归根本不是XML。我建议您安装 Fiddler [ ^ ]找出服务器发回的内容。
Chances are what you are getting back isn't XML at all. I suggest you install Fiddler[^] to find out what the server is sending back.


这篇关于Windows应用程序和Web服务之间的连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆