我找不到[WebInvoke]和[WebGet]。我已经添加了System.ServiceModel引用。有什么问题吗?我使用.NET框架4
发布于 2012-03-21 05:18:21
您需要添加对System.ServiceModel.Web.dll的引用。请注意,您需要针对完整的.NET框架( 3.5或4.0) --如果您的应用程序针对这些框架的客户端配置文件,这个程序集将不可用。
发布于 2015-01-14 12:46:03
需要添加引用System.ServiceModel.Web.dll并使用下面的语句using System.ServiceModel.Web;导入命名空间System.ServiceModel.Web,然后它才能工作。
发布于 2012-03-21 05:08:01
当使用属性时,类的“属性”部分是隐含的。
WebInvoke - WebInvokeAttribute
WebGet - WebGetAttribute
https://stackoverflow.com/questions/9798806
复制相似问题