且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Webservice的忽略ResponseFormat.Json

更新时间:2023-09-18 13:21:22

我的一位同事帮了我,在方向指向。我发现,处理程序是asp.net 2.0。将溶液从今年2.0-4.0更早升级。我所要做的就是替换:

A colleague of mine helped me out, pointing in direction. I found out that handlers were asp.net 2.0. The solution was upgraded from 2.0 to 4.0 earlier this year. all I had to do was replace:

<add name="WebServiceHandlerFactory-Integrated" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Services.Protocols.WebServiceHadlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />

<add name="WebServiceHandlerFactory-Integrated-4.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />

好主意是尝试暂时删除所有处理程序,只增加:

Good idea is to try removing all of the handlers temporarily, adding only:

<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

推荐文章