Page 1 of 1

.Net service w/ strange(?) ip address binding

Posted: Thu Aug 09, 2012 2:50 pm
by steelcity_ballin
Hello gents,

I've got a simple webservice I'm consuming in development that corresponds to a server on site. One of the first things you must do to use this webservice is to provide an admin ticket which you must contact a 3rd party's service to receive once proper credentials are in order. Long story short, to get this admin ticket you have to provide the site you're trying to use the ticket on which it will verify among other things. I'm getting a semi-generic error from .Net as follows:

System.Net.Sockets.SocketException: The requested address is not valid in its context 192.168.0.255:80


Googling provided little relief. Am I crazy for thinking that the IP address seems strange for a locally hosted website? So basically I have a website we'll call http://sub.website.com that is currently bound to that address. Is the IP legit? If it helps, I'm running this on server 2008 w/ IIS 7.0. I have this same exact code working elsewhere with a different website as a parameter without issue, so I can only help but think the IP is screwed some how in DNS perhaps. Any help?

Re: .Net service w/ strange(?) ip address binding

Posted: Thu Aug 09, 2012 3:21 pm
by derFunkenstein
.255 is the broadcast IP for your subnet, so without knowing a whole lot about your webservice or .NET, it appears it's trying to get the attention of any computer on the subnet.

Re: .Net service w/ strange(?) ip address binding

Posted: Thu Aug 09, 2012 5:03 pm
by notfred
It may not be the broadcast depending on what the subnet mask is. If the subnet mask is a /24 i.e. 255.255.255.0 then it is the broadcast, if not then it is a standard host address. It may be that .NET assumes that the 192.168.x.y is class C.

Re: .Net service w/ strange(?) ip address binding

Posted: Thu Aug 09, 2012 5:20 pm
by Ryu Connor
It is a private address and not routable to the Internet.

Only with a /23 or less would it not be the broadcast address. /24 forward will always result in it ending up the broadcast address for the last subnet.

Re: .Net service w/ strange(?) ip address binding

Posted: Fri Aug 10, 2012 7:23 am
by steelcity_ballin
Some more details that might be helpful:

IT says that the address is /23 but we're going to be assigning a different IP just to satisfy my paranoia. Another fact I'm not certain of (I just program, I don't setup much these days) but the main site has it's own zone and ip, the subdomain is setup as it's own zone too with the 255 IP. Is that the norm? I kinda expected that the subdomain would fall under the main domain in IIS at least, but that their IPs would be the same as well. I work pretty close with IT so if there's something I can ask them or otherwise relay we're glad to do it to solve this issue.

One more thing - Yesterday when we noticed that the subdomain had it's own zone, we removed that and things seemed fine until the boss came across issues with the non-subdomain site showing 404. We reverted everything to yesterday and the main site is back up, the subdomain works as far as a browser is concerned, but programming for it still gives me the same error as the OP.

Thanks again for the guidance.

Re: .Net service w/ strange(?) ip address binding

Posted: Fri Aug 10, 2012 9:58 am
by steelcity_ballin
update: We've resolved the problem. Not sure where the wires got crossed but simply removing the website and it's subdomain basically everywhere, then setting them back up with a new IP fixed what ails us. Code is running nicely. I think it's time to take a course or two on the network side of things, i'm out of touch.