什么是Web服务的Web方法的属性? [英] what is web method attribute in web service?

查看:183
本文介绍了什么是Web服务的Web方法的属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是Web服务的Web方法的属性?例如来回

what is web method attribute in web service? fro example

[WebMethod(EnableSession = true)]
[ScriptMethod(UseHttpGet = true)]
public string GetApplicationDomains(string strParameterList)
{

}

出于什么目的这样的WebMethod属性和ScriptMethod使用?

for what purpose this attributes WebMethod and ScriptMethod are used?

推荐答案

的WebMethod 表示方法公开为XML Web服务的一部分。

ScriptMethod 指定的HTTP动词用于调用的方法,以及响应的格式

WebMethod indicates "the method exposed as part of the XML Web service."
ScriptMethod "Specifies which HTTP verb is used to invoke a method, and the format of the response"

这篇关于什么是Web服务的Web方法的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆