User-1799376286 posted
I am trying to test my webservice locally by "Add service Reference" tool and the Discovring the webservice in current solution by getting an error message saying:
There was an error downloading 'http://localhost:55679/RESTService.svc/_vti_bin/ListData.svc/$metadata'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost:55679/RESTService.svc'.
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
Below is what i have in my config file:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="JsonServiceBehaviors">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webHttpBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="jsonp" crossDomainScriptAccessEnabled="true" />
<binding name="jsonpSsl" crossDomainScriptAccessEnabled="true">
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="RESTService.RESTService" behaviorConfiguration="JsonServiceBehaviors">
<endpoint address="" binding="webHttpBinding"
bindingConfiguration="jsonp" contract="RESTService.RESTService"
behaviorConfiguration="webHttpBehavior"/>
<endpoint address="" binding="webHttpBinding"
bindingConfiguration="jsonpSsl" contract="RESTService.RESTService"
behaviorConfiguration="webHttpBehavior"/>
</service>
</services>
</system.serviceModel>