Я недавно создал WCF, и у меня 400 ошибочных запросов, когда я пытаюсь попасть по URL из браузера.
мой сервисный контракт выглядит как
[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