我想在互联网上使用我的网络服务。我打开了我的端口是4501,我禁用了调制解调器和windows上的防火墙。我可以写我的全球ip,我可以打开调制解调器控制接口。但是我想连接到地址是XX.XX:4501/Products.svc的iis
它可以在本地主机(http://localhost:4501/Product.svc)上工作,但我无法连接到互联网上的svc。
我不知道问题出在哪里。
当我添加我的svc链接地址作为添加参考服务时,我得到了这个错误
There was an error downloading 'http://xx.xx.xx.xx:4501/Products.svc'.
Unable to connect to the remote server
Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı xx.xx.xx.xx:4501
Metadata contains a reference that cannot be resolved: 'http://xx.xx.xx.xx:4501/Products.svc'.
There was no endpoint listening at http://xx.xx.xx.xx:4501/Products.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Unable to connect to the remote server
Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı xx.xx.xx.xx:4501
If the service is defined in the current solution, try building the solution and adding the service reference again.再多一点,
如果我开始使用IIS,wcf服务甚至在localhost中都不能工作。如果我在Visual Studio中启动它(我的意思是asp.net开发服务可以工作),它就能工作。
IIS版本是7.5.7600,我将应用程序池添加为Asp.net 4.0
发布于 2012-06-27 10:20:42
在IIS中使用端口4501作为HTTP有什么特别的原因吗?
Visual Studio2010 WebDev WebServer (Cassini)使用随机端口号(在您的示例中为4501)来简化配置。它假设端口80可以被它的老大哥IIS或任何其他软件占用。
这对于在本地机器上进行开发是很好的,但是在生产环境中不需要使用相同的端口。
默认HTTP端口为80,通常是网络中开放程度最高的端口。
在IIS中使用端口80进行HTTP通信,您的工作将会轻松得多。
附言:你有没有试过http://xx.xx.xx.xx/Products.svc?端口号是web服务配置的一部分,在将应用程序移动到IIS时不会复制端口号。IIS可能已使用默认HTTP端口。
https://stackoverflow.com/questions/11216117
复制相似问题