ブラウザからURLをヒットしようとすると、WCFが新しく作成され、400の不正な要求エラーが発生します。
私のサービス契約は次のようになります
[OperationContract]
[WebInvoke(Method = "GET", UriTemplate = "GetUsers")]
string GetUsers();
私はすでにwebconfigに次のようにエントリを作成しました
<serviceMetadata httpGetEnabled="true"/>
ブラウザでヒットしたURLは
http://localhost:51561/AceWebService.svc/GetUsers
これがwebconfigの一部です:
<system.serviceModel>
<services>
<service name="AceWebService.AceWebService" behaviorConfiguration="AceWebService.AceWebServiceBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="AceWebService.IAceWebService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="AceWebService.AceWebServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
ここでstackoverflowで利用可能なすべてのキューを参照しました..ヘルプが表示されません..変更を提案してください。
thnx