WCF サービス用に 2 つのエンドポイントを作成しました。
で正常に動作してbasicHttpBinding
いますが、 でエラーが発生しますwebHttpBinding
。
エラー = エンドポイントが見つかりません。
運用契約定義
[OperationContract]
[WebInvoke(Method = "POST",
BodyStyle = WebMessageBodyStyle.WrappedRequest,
ResponseFormat = WebMessageFormat.Json)]
VINDescription CallADSWebMethod(string vin, string styleID);
web.config
:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Description7aBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://services.chromedata.com:80/Description/7a"
binding="basicHttpBinding"
bindingConfiguration="Description7aBinding"
contract="description7a.Description7aPortType"
name="Description7aPort"/>
</client>
<services>
<service behaviorConfiguration="asmx" name="ADSChromeVINDecoder.Service">
<endpoint name="httpEndPoint"
address=""
binding="basicHttpBinding"
contract="ADSChromeVINDecoder.IService"/>
<endpoint name="webEndPoint"
address="json"
behaviorConfiguration="web"
binding="webHttpBinding"
contract="ADSChromeVINDecoder.IService"/>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
<enableWebScript/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="asmx">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
これを修正する方法を教えてください。