Multiple Endpoint Error

Posted by Prtkaggrwl under WCF on 5/13/2015 | Points: 10 | Views : 425 | Status : [Member] | Replies : 0
Web Config
<?xml version="1.0"?>
<configuration>

<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="WcfServiceApp.Service1" behaviorConfiguration="behname">
<!--<endpoint address="/basic" binding="basicHttpBinding" contract="WcfServiceApp.IService1"></endpoint>
<endpoint address="/ws" binding="wsHttpBinding" contract="WcfServiceApp.IService1"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>-->

<endpoint name="firstBinding" address ="/MyFirst" binding ="basicHttpBinding" contract ="WcfServiceApp.IService1" />
<endpoint name="secondBinding" address ="/MySecond" binding ="wsHttpBinding" contract ="WcfServiceApp.IService1"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />

<host>
<baseAddresses>
<add baseAddress="http://localhost:50413/Service1.svc"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="behname">
<!-- 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>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

</configuration>

Getting "Http Bad Request 400" Error while accessing URL "http://localhost:50413/Service1.svc/MyFirst"




Responses

(No response found.)

Login to post response