How to Solve There is no compatible TransportManager found for URI ‘http://localhost/WCFSample/Service.svc’.

This is the error message we can find when we host our WCF services on our local system:

There is no compatible TransportManager found for URI ‘http://localhost/WCFSample/Service.svc'. This may because that you have used an absolute address which points outside of the virtual application. Please use relative address instead.

image_1.png

To solve it, you need to change your web.config file section before host your WCF Services. This is the code:

<system.serviceModel>
<services>
<service name="Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="http://localhost/WCFServiceSample/Service.svc" binding="wsHttpBinding" contract="IService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

After get that error I leave the endpoint address blank like this

<system.serviceModel>
<services>
<service name="Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" contract="IService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>

</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

Then, please try it. Hope it is help. But, if you run your application and get this error message like this, The page you are requesting cannot be served because of the extension configuration.  

Ebook Download
View all
Learn
View all