webservice 配置

webservice 配置

<system.web>
    <!--允许GET/POST请求 -->
    <webServices>
      <protocols>
        <add name="HttpSoap" />
        <add name="HttpPost" />
        <add name="HttpGet" />
        <add name="Documentation" />
      </protocols>
    </webServices>
  </system.web>
  <system.webServer>
    <!--允许跨域请求 -->
    <httpProtocol>
      <customHeaders>
        <add name="Access-Control-Allow-Methods" value="OPTIONS,POST,GET" />
        <add name="Access-Control-Allow-Headers" value="x-requested-with,content-type" />
        <add name="Access-Control-Allow-Origin" value="*" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>

 

posted @ 2018-08-24 19:14  microsoftzhcn  阅读(1105)  评论(0编辑  收藏  举报