EndpointNotFoundException : There was no endpoint listening?


Y

Yash

I have hosted my service on IIS 5.1 on Win XP. I have configured it as
follows:
.
.
.
<wsHttpBinding>
<binding name="WSHttp0">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service
behaviorConfiguration="WcfServiceLibrary.Service1Behavior"
name="WcfServiceLibrary.MyService">
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
<endpoint address="" binding="wsHttpBinding"
name="WSEP" bindingName="WSHttp0"
contract="WCFContractsLib.IContract1" />
</services>

The client app has the exact same binding configuration. The client's
endpoint is configured as:
<endpoint address="https://lap442/WCF/MyService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttp0"
contract="WCFContractsLib.IContract1"
name="WSEP" />

When I access the service in IE, using this URL
https://lap442/WCF/MyService.svc
I get a descriptive page which means the service is working fine.
When I inspect the IIS logs, it shows:
15:11:35 127.0.0.1 GET /WCF/MyService.svc 200

When I access the service through a client app, I get an error in the
client that says:
"There was no endpoint listening at https://lap442/WCF/MyService.svc"

The Exception is:
"There was no endpoint listening at https://lap442/WCF/MyService.svc
that could accept the message. This is often caused by an incorrect
address or SOAP action. See InnerException, if present, for more
details."}

The inner exception is:
{"The remote server returned an error: (404) Not Found."}

When I inspect the IIS logs, it shows:
15:26:06 127.0.0.1 POST /WCF/MyService.svc 404

What could be the reason behind such an error. What changes do I need
to make in the config.

Thanks,
Yash
 
Ad

Advertisements

B

Ben Amada

When I access the service in IE, using this URLhttps://lap442/WCF/MyService.svc
I get a descriptive page which means the service is working fine.
When I inspect the IIS logs, it shows:
15:11:35 127.0.0.1 GET /WCF/MyService.svc 200

When I access the service through a client app, I get an error in the
client that says:
"There was no endpoint listening athttps://lap442/WCF/MyService.svc"

The Exception is:
"There was no endpoint listening athttps://lap442/WCF/MyService.svc
that could accept the message. This is often caused by an incorrect
address or SOAP action. See InnerException, if present, for more
details."}

The inner exception is:
{"The remote server returned an error: (404) Not Found."}

When I inspect the IIS logs, it shows:
15:26:06 127.0.0.1 POST /WCF/MyService.svc 404

What could be the reason behind such an error. What changes do I need
to make in the config.

This is probably not much help, but looking at the IIS logs, your
client app is doing a POST where the IE browser is doing a GET.
Probably your endpoint is not configured for POST requests. If you're
not posting any data to the service, you could try and change the
client app so it does a GET instead of a POST. Or you could configure
your service to accept POST requests. This should just be a pretty
simple configuration change (not something I've done though, sorry).
 
Ad

Advertisements

Y

Yash

I think all requests HAVE to be POSTs as the SOAP request needs to be
POSTed. I have tried this with basicHttpBinding and it works. The logs
show a POST request and the client gets the correct data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top