在C#中,新建一个webservice,默认是post类型的。

所谓的post就是指方法的参数不是靠URl传入进去的,而是靠的是直接输入值。

而Get方式的话,是可以直接访问webservice的方法,然后参数,在source可以通过

“this.Context.Request.QueryString["FeedUrl"];”获得。

URL:

http://localhost:9901/Service.asmx/ChangeArticleCodeLength?FeedUrl=http%3A%2F%2Fmoney.jp.msn.com%2Ftopics_db_rss%2Fbizmakoto_economy.aspx

(访问:ChangeArticleCodeLength方法)

 

 

在WEBConfig里面配置如下:{即可以是Post,也可以是Get类型的}

 

    <system.web>

<webServices>
<protocols>
<add name="HttpPost"/>
<add name="HttpGet"/>
</protocols>
</webServices>

    </system.web>

相关文章:

  • 2021-06-01
  • 2022-12-23
  • 2021-11-18
  • 2021-09-01
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-04
  • 2021-11-28
相关资源
相似解决方案