将net.tcp WCF服务从本地主机移到新站点上的IP地址,服务不会加载 [英] moved net.tcp WCF services from localhost to IP address on new site, services won't load

查看:177
本文介绍了将net.tcp WCF服务从本地主机移到新站点上的IP地址,服务不会加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行2个WCF服务的网站.工作很棒,直到需要将它们从IIS7中的默认网站"移动到具有新IP地址的专用网站为止.现在,我收到错误消息:

I have a website running 2 WCF services. Working awesome until I needed to move them from the "Default Web Site" in IIS7 to a dedicated website with a new IP address. Now I get the error message:

"...无法加载,因为找到了该合同的多个端点配置.请按名称指示首选的端点配置部分"

"...could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name"

我所做的只是改变:

net.tcp://localhost/...

net.tcp://localhost/...

收件人:

net.tcp://10.1.2.204/...

net.tcp://10.1.2.204/...

我已经更改了配置中的每个位置,这些位置曾经使用localhost来指定IP地址.新网站的设置与net.tcp绑定完全相同,并且绑定到10.1.2.204的单个IP地址.

I have changed every spot in my configs which once used localhost to specified IP address. The new website is setup exactly the same with the proper net.tcp bindings and it is bound to the single IP address of 10.1.2.204.

我似乎无法弄清楚发生了什么.我正在查看svc跟踪日志,而我得到的只是一堆相同的东西.

I cannot seem to figure out what is going on. I am looking at the svc trace logs and all I get is a bunch of the same.

我的新网站称为核心",而以前我是在默认网站"上托管的.我添加了一个新的FQDN/公共IP,以路由到该新站点(向后提到所提到的私有IP地址).现在我的服务被取消了.

My new website is called "core" whereas previously I was hosting on "Default Web Site". I added a new FQDN/public IP to route to this new site (backwards to the mentioned private IP address). Now my services are busted.

我知道在使用IIS/WAS托管时会忽略baseAddress,所以我不确定还需要检查什么.我完全没有改变配置.

I know baseAddress is ignored when using IIS/WAS hosting, so I am not sure what else to check. I changed absolutely nothing else in the configs.

我还能提供什么帮助解决此问题?

What else can I provide to help troubleshoot this?

-

我也在服务跟踪查看器中看到了这一点:

I am also seeing this in the service trace viewer:

活动名称在连接'net.tcp://hole.myserver.com/...'上接收字节".

Activity Name Receive bytes on connection 'Listen at 'net.tcp://hole.myserver.com/...'.'.

...但是WCF服务实际上托管在该新的核心"网站上,该网站转换为我的新专用IP地址.我为示例更改了FQDN名称.明确说明:

...but the WCF services are actually hosted on that new "core" website which translates to my new private IP address. I have change FQDN names for the example. To make it clear:

我以前使用默认网站在此服务器上拥有1个FQDN.

I used to have 1 FQDN on this server using Default Web Site.

我现在在此服务器上添加了第二个FQDN,即新的网站,第二个IP.在我看来,侦听应该针对:net.tcp://core.myserver.com,而不是net.tcp://hole.myserver.com.假设服务器名称为hole.myserver.com,而我的新网站为同一服务器上的core.myserver.com.

I now added a 2nd FQDN to this server, new website, second IP. It seems to me that the listening should be directed towards: net.tcp://core.myserver.com instead of net.tcp://hole.myserver.com. Let's pretend the server name is hole.myserver.com and my new website is core.myserver.com on the same server.

希望这不会造成混淆,您可以理解它.

Hopefully this is not confusing and you can make sense of it.

我正在使用默认的net.tcp端口808和绑定808:*

I'm using the default net.tcp port of 808 and binding of 808:*

-

这是我可以告诉的第一个异常:

This is the first exception thrown that I can tell:

套接字连接已中止.这可能是由于处理您的消息时出错或远程主机超出了接收超时,或者是潜在的网络资源问题引起的.本地套接字超时为"00:00:10".

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:10'.

-

这些组合都不会激活该服务,并且均会产生相同的异常:

None of these combos will activate the service and all produce the same exception:

net.tcp://本地主机 net.tcp://本地主机:808 net.tcp://10.1.2.204 net.tcp://10.1.2.204:808

net.tcp://localhost net.tcp://localhost:808 net.tcp://10.1.2.204 net.tcp://10.1.2.204:808

甚至使用我之前做过的其他端口也没问题:

even using a different port which I have done before without issue:

net.tcp://localhost:75 net.tcp://10.1.2.204:75

net.tcp://localhost:75 net.tcp://10.1.2.204:75

这些工作都没有. :(

none of these work. :(

非常感谢!

推荐答案

它的配股.右键点击您的新网站->然后点击编辑权限.在属性窗口中,单击安全性标签和 Edit 按钮.然后添加IIS_IUSRS 并提供 Read&执行,列出文件夹内容,读取权限.现在 iisreset 并开始在新网站上托管和连接net tcp.

Its rights issue. Right click on your new website --> then Edit Permissions. On properties window click security tab and Edit button. Then Add IIS_IUSRS and give Read & Execute, List folder contents, Read permissions. Now iisreset and start to host and connect net tcp on new website.

这篇关于将net.tcp WCF服务从本地主机移到新站点上的IP地址,服务不会加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆