Here are the required web.config for rest based API
<system.serviceModel>
<services>
<service name="WcfService1.MarketFeed" behaviorConfiguration="serviceBehavior">
<endpoint address="" binding="webHttpBinding" contract="WcfService1.IMarketFeed" behaviorConfiguration="web"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceMetadata httpGetEnabled="false"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.serviceModel>
<services>
<service name="WcfService1.MarketFeed" behaviorConfiguration="serviceBehavior">
<endpoint address="" binding="webHttpBinding" contract="WcfService1.IMarketFeed" behaviorConfiguration="web"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceMetadata httpGetEnabled="false"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
No comments:
Post a Comment