解决方案:
1.在web.config的system.web节点中添加<pages validateRequest="false" />
2.设置web.config的system.web->httpRuntime的属性requestValidationMode=2.0

<system.web>
  <compilation targetFramework="4.5.2"/>
  <httpRuntime targetFramework="4.5.2" requestValidationMode="2.0" executionTimeout="7200000"/>
  <pages validateRequest="false"/>
  <httpModules>
    <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
  </httpModules>
  <webServices>
    <protocols>
      <add name="HttpSoap"/>
      <add name="HttpPost"/>
      <add name="HttpGet"/>
      <add name="Documentation"/>
    </protocols>
  </webServices>
</system.web>

标签: IIS, WebService

添加新评论