开发者

There was no endpoint listening and Error 404

开发者 https://www.devze.com 2023-04-01 13:39 出处:网络
We have deployed a web service on a production server and still getting this error once trying to get a call to it :

We have deployed a web service on a production server and still getting this error once trying to get a call to it :

"There was no endpoint listening at http://www.ourproductionserver.com/ClientService.svc/mex that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."

When looking into the InnerException, it return us a 404 File Not Fou开发者_StackOverflownd...

Weird part, is that if we copy/past the exact same url as giving in the error below (http://www.ourproductionserver.com/ClientService.svc) in IE or FireFox, it shows correctly. Heum, what do we do wrong?

We've also tried it on a local server and everything works fine.

Anyone alrealy get something similar and how to resolve it?

Note : Sorry for my english, I usualy talk french.

Our webconfig :

<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
  <webHttpBinding>
    <binding name="WebBinding"></binding>
  </webHttpBinding>
</bindings>
<services>
  <service name="ourLib.ServiceImplementations.ClientActionService" behaviorConfiguration="ServiceBehavior">
    <endpoint name="WebEndpoint" behaviorConfiguration="EndpointBehavior" address="" binding="webHttpBinding"
              contract="ourLib.ServiceContracts.IClientActionService">
    </endpoint>
    <endpoint contract="ourLib.ServiceContracts.IClientActionService" address="mex" binding="mexHttpBinding"></endpoint>
  </service>
<system.serviceModel>

Our ClientService.svc

 <%@ ServiceHost Language="C#" Debug="true" Service="ourLib.ServiceImplementations.ClientActionService" %>

UPDATE We discover that the ISP is set to medium trust level when we are set to Full trust. Can it change something? If yes, how could we change it other than web.config (which we alrealy tried).


What is "/mex"? Is that a function within your service class? I just tested on my own Webservice.svc and wasn't able to do / so I'm not sure you can actually do that...

If you are trying to get a client to connect to your service, you should be able to just use the .svc URL and then invoke a function on the .NET-generated client object.


It looks like you're trying to make a call out to the metadata exchange endpoint (mex) which is only used when generating the metadata (the WSDL) in the first place. I would suggest checking where you set the service url and making sure you don't have the mex part on the end.


Well neither of us or the ISP find the reason why so instead of talking to the webservice to gain access to the DB, they've put a public IP Address so we can access to the Database directly via this IP instead of goin through a webservice.

Thanks you all but I would love to find out why in case this happen another time in the futur ...

0

精彩评论

暂无评论...
验证码 换一张
取 消