json を使用してサービスを利用するために、すべてのエンドポイント、バインディング、および動作をセットアップしましたが、クライアントの JavaScript JQuery コードから Ajax を介してアクセスするために JavaScript プロキシを生成する方法がわかりません。何か案は?
WCF とクライアントの間でサーバー側のアプローチを使用するように提案しないでください (たとえば、サービスを使用する asp.net mvc アクション)。
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="Binding1" />
</webHttpBinding>
</bindings>
<services>
<service name="IServiceForJQuery">
<endpoint behaviorConfiguration="Behavior1"
binding="webHttpBinding" bindingConfiguration="Binding1" name="Endpoint1"
contract="IServiceForJQuery" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="Behavior1">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>