2012-06-26 59 views
0

我想在互联网上使用我的web服务。我打开了我的4501端口,并在调制解调器和Windows上禁用了防火墙。我可以写我的全球IP,我可以打开调制解调器控制接口。但我想连接到iis的地址是xx.xx.xx.xx:4501/Products.svc如何发布我的WCF服务?

它适用于localhost(http:// localhost:4501/Product.svc)但我不能连接到svc在互联网上。

我不知道问题在哪里。

当我加入我的SVC链接ADDRES如添加参考服务,我得到这个错误

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服务不工作。如果我在Visual Studio中启动它(我的意思是asp.net开发服务工程)它的工作原理..

IIS版本7.5.7600和我添加的应用程序池Asp.net 4.0

回答

0

有什么具体的理由您在IIS中使用HTTP端口4501?

Visual Studio 2010 WebDev WebServer(Cassini)使用随机端口号(4501)来简化配置。它假设端口80可以被其兄弟IIS或任何其他软件占用。

这对本地机器的开发很好,但不需要在生产中使用同一个端口。

默认HTTP端口是80,它通常是网络中最开放的开放端口。

将端口80用于IIS中的HTTP流量,您的生活将会更容易。

P.S.你试过http://xx.xx.xx.xx/Products.svc?端口号是Web服务配置的一部分,并且在将应用程序移动到IIS时不会被复制。 IIS可能已经使用默认的HTTP端口。

+0

谢谢你的回答。我改变端口为80,当我写我的谎言http://xx.xx.xx.xx,调制解调器接口仍然打开..当我尝试http://xx.xx.xx.xx/Products.svc我收到此错误对象未找到 在RomPager高级服务器上未找到请求的URL'/Products.svc'。它工作http://localhost/Products.svc – unbalanced

+0

@HarunAbi IIS现在工作正常。您需要解决网络配置问题。我不是这方面的专家。抱歉。我会建议添加更多的网络细节和标签到你的问题。 –