首页 文章

新环境中的反序列化错误

提问于
浏览
1

我有一个调用第三方Web服务的Web应用程序 . 当我在本地运行它时,我没有问题,但当我将它移动到我的 生产环境 环境时,我收到以下错误:

XML文档中存在错误(2,482) . Stack:位于System.Web.Services.Protocols.SoapHttpClientProtocol的System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,String encodingStyle)的System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,String encodingStyle,XmlDeserializationEvents事件) . System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object [] parameters)中的ReadResponse(SoapClientMessage消息,WebResponse响应,Stream responseStream,Boolean asyncCall),RMXClasses.RMXContactService.ContactService.getActiveSessions(String user,String pass)在C:\ Users \ hp \ Documents \ Visual Studio 2008 \ Projects \ ReklamStore \ RMXClasses \ Web References \ RMXContactService \ Reference.cs:第257行:

我在 生产环境 环境中使用了相同的Web配置文件,但它仍可在本地使用 . 我的本地机器是一个正在运行的vista家庭版, 生产环境 环境是windows server 2003.该应用程序是用asp.net 3.5编写的,在iis的asp.net config选项卡下,3.5没有显示在下拉列表中,虽然安装了该版本的框架 . 我的代码中没有抛出错误,它在序列化期间发生 . 我在代理上调用了方法,我检查了参数并且它们没问题 . 我还记录了SOAP请求和响应,它们看起来都很好 . 我真的很茫然 . 有任何想法吗?

SOAP日志:这是soap响应,程序似乎只在服务器2003上解析时遇到问题 . 在我的机器上,soap是相同的,但它解析没有问题 .

SoapResponse BeforeDeserialize; <?xml version =“1.0”encoding =“UTF-8”?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV =“http://schemas.xmlsoap.org/soap/envelope/”xmlns:ns1 =“urn:ContactService”xmlns:ns2 =“http://api.yieldmanager . com / types“xmlns:SOAP-ENC =”http://schemas.xmlsoap.org/soap/encoding/“xmlns:xsd =”http://www.w3.org/2001/XMLSchema“xmlns:xsi =” http://www.w3.org/2001/XMLSchema-instance“SOAP-ENV:encodingStyle =”http://schemas.xmlsoap.org/soap/encoding/“> <SOAP-ENV:Body> <ns1:getActiveSessionsResponse > <sessions SOAP-ENC:arrayType =“ns2:session [1]”xsi:type =“ns2:array_of_session”> <item xsi:type =“ns2:session”> <token xsi:type =“xsd:string” > xxxxxxxxxxxxxxxxxxxx1ae12517584b </ token> <creation_time xsi:type =“xsd:dateTime”> 2009-09-25T05:51:19Z </ creation_time> <modification_time xsi:type =“xsd:dateTime”> 2009-09-25T05:51 :19Z </ modification_time> <ip_address xsi:type =“xsd:string”> xxxxxxxxxx </ ip_address> <contact_id xsi:type =“xsd:long”> xxxxxx </ contact_id> </ item> </ sessions> </ NS1:getActiveSessionsResponse> </ SOAP-ENV:BODY> </ SOAP-ENV:Envelope>在

2 回答

  • 0

    你试过跑Aspnet_regiis.exe吗?

    当多个版本的.NET Framework在一台计算机上并行执行时,映射到ASP.NET应用程序的ASP.NET ISAPI版本确定将哪个版本的公共语言运行时(CLR)用于该应用程序 . ASP.NET IIS注册工具(Aspnet_regiis.exe)允许管理员或安装程序轻松更新ASP.NET应用程序的脚本映射,以指向与该工具关联的ASP.NET ISAPI版本 . 该工具还可用于显示所有已安装的ASP版本的状态 . NET,注册与该工具结合的ASP.NET版本,创建客户端脚本目录,以及执行其他配置操作 .

  • 0

    IIS中ASP.Net中列出的.Net版本显示了已安装CLR的版本 . .Net 3和3.5仍然使用CLR的第2版,它们只为WCF,Linq等添加了额外的类 .

    就实际问题而言,您是否可以在Vista计算机上运行调试代码并在 生产环境 计算机上发布代码?构建中是否有任何差异?两个环境中的所有组件都在同一类型的位置吗?

相关问题