We have deployed a web service on a production server and still getting this error once trying to get a call to it :
我们已经在一个生产服务器上部署了一个web服务,并且在尝试调用它时仍然会得到这个错误:
"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."
在http://www.ourproductionserver.com/ClientService.svc/mex中没有端点监听可以接受消息。这通常是由错误的地址或SOAP操作引起的。如果有更多的细节,请参见内部异常。
When looking into the InnerException, it return us a 404 File Not Found...
当查看InnerException时,它返回一个404文件,但没有找到……
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?
奇怪的是,如果我们复制/通过IE或FireFox中的错误(http://www.ourproductionserver.com/ClientService.svc)的url,它会显示正确。我们做错了什么?
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 :
我们的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
我们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).
更新时,我们发现当我们设置为完全信任时,ISP被设置为中等信任级别。它能改变什么吗?如果是的话,除了web,我们还能做什么改变呢?配置(我们已经试过了)。
3 个解决方案
#1
2
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.
如果您试图让客户端连接到您的服务,您应该能够使用.svc URL,然后在. net生成的客户端对象上调用一个函数。
#2
0
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.
看起来您正在尝试调用元数据交换端点(mex),它只在生成元数据(WSDL)时使用。我建议您检查服务url的设置位置,并确保末尾没有mex部分。
#3
0
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.
我们和ISP都没有找到原因,他们没有通过网络服务来访问数据库,而是建立了一个公共的IP地址,这样我们就可以通过这个IP直接访问数据库而不是通过webservice访问数据库。
Thanks you all but I would love to find out why in case this happen another time in the futur ...
谢谢大家,但是我很想知道为什么万一以后发生这种事……
#1
2
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.
如果您试图让客户端连接到您的服务,您应该能够使用.svc URL,然后在. net生成的客户端对象上调用一个函数。
#2
0
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.
看起来您正在尝试调用元数据交换端点(mex),它只在生成元数据(WSDL)时使用。我建议您检查服务url的设置位置,并确保末尾没有mex部分。
#3
0
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.
我们和ISP都没有找到原因,他们没有通过网络服务来访问数据库,而是建立了一个公共的IP地址,这样我们就可以通过这个IP直接访问数据库而不是通过webservice访问数据库。
Thanks you all but I would love to find out why in case this happen another time in the futur ...
谢谢大家,但是我很想知道为什么万一以后发生这种事……