Thursday, January 12, 2017

There was no endpoint listening at (url) that could accept the message

                                                               Recently I got this exception .When I was trying to call a WCF service hosted in a new server from a Web application in my local. I got the error below

There was no endpoint listening at http://localhost:[number]/XXXXX.svc that could accept the

message. This is often caused by an incorrect address or SOAP action. See InnerException,

if present, for more details.


Initially i thought that some configuration went wrong .After investigation i found that we need to disable the default proxy.I have  added below config settings  in  the Web.config of service host project. After that everything worked perfectly !!!

<system.net>
    <defaultproxy enabled="false">
    </defaultproxy>
</system.net>