0
votes

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"

ALL I did was change:

net.tcp://localhost/...

TO:

net.tcp://10.1.2.204/...

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.

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.

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.

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:

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

...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:

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

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.

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

--

This is the first exception thrown that I can tell:

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://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

none of these work. :(

Thanks so much!

1
the same binaries are being used. those were not touched.user514005
I realize this seems quite petty and basic as far as configuration, but I am stumped. It really makes no sense to me. I have realized that it doesn't matter if the net.tcp:// address uses localhost or the website IP address since we are communicating with a dedicated TCP port and only one site is currently setup for TCP on this server. What is so confusing is that simply creating the new website and my 2 applications within the site causes this to happen.user514005
The only difference from this website vs. when using "Default Web Site" is that "Default Web Site" had a 3rd application for the MVC website whereas my new website, core, does not and simply points the root of the website at the MVC site root. This works fine, as expected. So, I am totally confused until the solution presents itself as probably a silly one.user514005
So I have fixed this issue, but I now need to understand why. I moved my WCF services back to the "Default Web Site", added the net.tcp binding back to "Default Web Site", removed the net.tcp binding from the "core" website site and the services now work again. So my question is, what is the proper way to host WCF services on an alternate website besides "Default Web Site" where the default site does not have a net.tcp binding and the WCF services are using the default port of 808? I will post another question or search more intently for the solution. Thanks for following along.user514005
I am having similar issues when not using Default Web Site stackoverflow.com/questions/8548883/…Rodney

1 Answers

0
votes

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.