让WebService支持Get请求

在C#中,新建一个webservice,默认是post类型的。如果需要支持Get请求,需要对web.config文件进行配置

  <system.web>
    <compilation debug="true" targetFramework="4.6.1"/>
    <httpRuntime targetFramework="4.6.1"/>
    <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
      </protocols>
    </webServices>
  </system.web>
原文地址:https://www.cnblogs.com/caoyc/p/6830095.html