让WebService支持Get请求
Posted JustDo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了让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>
以上是关于让WebService支持Get请求的主要内容,如果未能解决你的问题,请参考以下文章