添加 REST 服务错误"预期类型"



在"描述"一词上,我收到错误"预期类型"

Imports System.ServiceModel
Imports System.Web
Imports System.IO
Imports System.Runtime.Remoting.Activation
Imports System.Collections.Generic
Imports System.ServiceModel.Web
Namespace SimpleRESTService
<ServiceContract()> _
Public Interface IService
    <Description("Simple echo operation over HTTP GET"), _
     WebGet()> _
    Function EchoWithGet(ByVal s As String) As String
    <Description("Simple echo operation over HTTP POST"), _
     WebInvoke()> _
    Function EchoWithPost(ByVal s As String) As String
End Interface
End Namespace

WCF 中没有"说明"属性。也许您可以使用以下解决方法:

http://andrewtokeley.net/archive/2008/10/30/adding-wsdl-documentation-to-your-wcf-services.aspx

相关内容