pavanarya – Pavan Kumar Aryasomayajulu

Contact Email : pavan.aryasomayajulu@gmail.com

stackoverflow answers

leave a comment »

Question:
http://stackoverflow.com/a/12194771/1415739

Hi the first and foremost issue that i see in your config file is with Endpoints configuration.


<endpoint address=”” binding=”webHttpBinding” bindingConfiguration=”default”
contract=”IWW.MIGTurbo2.WCF.Security.ISecurityBroker”
behaviorConfiguration=”webHttpEnablingBehaviour”>
</endpoint>

<!– This is for WinForms clients, but isn’t working –>

<endpoint address=”” binding=”basicHttpBinding” bindingConfiguration=”default”
contract=”IWW.MIGTurbo2.WCF.Security.ISecurityBroker”
behaviorConfiguration=”webHttpEnablingBehaviour”>
</endpoint>
[/c#]
Here we are not specifying any address and listenuri in the tag . So we will have default values for these and also for the 2 endpoints we will have same address and same listenuri(ie default values).

So here comes the problem. 1. we cannot have different types of binding with same listenuri and same address. But in your case as you are specifying empty values for address, both the endpoints will have same values

Resolution: 1. specify different address for both the endpoints instead of leaving them as empty.

<endpoint address=”Rest” binding=”webHttpBinding” bindingConfiguration=”default”
contract=”IWW.MIGTurbo2.WCF.Security.ISecurityBroker”
behaviorConfiguration=”webHttpEnablingBehaviour”>
</endpoint>

<!– This is for WinForms clients, but isn’t working –>

<endpoint address=”WebForm” binding=”basicHttpBinding” bindingConfiguration=”default”
contract=”IWW.MIGTurbo2.WCF.Security.ISecurityBroker”
behaviorConfiguration=”webHttpEnablingBehaviour”>
</endpoint>
[/java]
So even though we are using different bindings and same listenuri(if we don’t specify listenuri it will be default) as the address(relative address) values differ it will be working fine.

Thanks,
pavan

Written by pavanarya

September 28, 2017 at 10:12 am

Posted in Asp.net