I have a simple WCF4 REST service that is working fine when using the browser However, when I have someone in VS2010 Trying to add service references from other projects, I get an error saying "HTML document does not contain information for searching the web service."
My question is, because there is a new simplified config model in WCF4, I can not find an example working on current metadata exchange expense for exposed standard endpoint.
I tried to add an entry shown below but did not solve the problem.
This is my config:
& lt; System.serviceModel & gt; & Lt; Service hosting environment aspNetCompatibilityEnabled = "true" /> & Lt; StandardEndpoints & gt; & Lt; WebHttpEndpoint & gt; & Lt ;! - Address and configure the WCF REST service base through the global.asax.cs file and & lt; Standard Endpoint & gt; Default endpoint through attributes on Element below - & gt; & Lt; Standard Endpoint Name = "helpEnabled =" true "automaticFormatSelectionEnabled =" true "/> Standard
Any help will be highly appreciated.
Rick
Metadata Endpoints exposes WSDL + XSD that describes SOAP services REST There is no support for exposing metadata for WCF does not support WADL (REST save S).
If you need to add metadata to the SOAD service with soda service, then you need to add this behavior:
& lt; configuration & Gt; & gt; System.serviceModel & gt; & lt; Behavior & gt; & gt; ServiceBehaviors & gt; & lt; Behavior & gt; & lt; serviceMetadata httpGetEnabled = "true" /> & gt; & lt; / Behavior & gt; & lt; / serviceBehaviors & gt; & Lt; / Behavior & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt;
Comments
Post a Comment