C# WCF服务Ajax/jQuery调用
我对web服务这方面还不熟悉 我试图让我的web服务工作,但没有成功。我已尝试更改web.config和web服务,但无论如何都无法调用它 使用“UriTemplate”的终结点不能与“System.ServiceModel.Description.WebScriptEnableingBehavior”一起使用 Web.configC# WCF服务Ajax/jQuery调用,c#,jquery,ajax,web-services,wcf,C#,Jquery,Ajax,Web Services,Wcf,我对web服务这方面还不熟悉 我试图让我的web服务工作,但没有成功。我已尝试更改web.config和web服务,但无论如何都无法调用它 使用“UriTemplate”的终结点不能与“System.ServiceModel.Description.WebScriptEnableingBehavior”一起使用 Web.config 它应该像下面这样 <endpointBehaviors> <behavior name="WebHTTP">
它应该像下面这样
<endpointBehaviors>
<behavior name="WebHTTP">
<webHttp/>
</behavior>
</endpointBehaviors>
还要为bindingConfiguration=binding添加绑定配置部分
[OperationContract]
[WebGet(UriTemplate = "/ListarSubscricoesActivas", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
public object ListarSubscricoesActivas()
{ ... }
<endpointBehaviors>
<behavior name="WebHTTP">
<webHttp/>
</behavior>
</endpointBehaviors>