Thursday, February 9, 2012

New IIS 7 Site not working and no error messages

I ran into a problem where I was setting up a new web site on an existing IIS 7 server and couldn't get the site to return anything to the browser. Not even an error message!
The new site used a new ip address and port which appeared fine in Windows 2008 and in IIS Manager.

I removed the site and added it back several times. Tried everything I could think of to the App Pools but couldn't even get an event to be logged in the event viewer.

When the site was added to IIS, it first showed the error:

“Unknown: The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)”

This didn’t help much as it went away when you refresh IIS Manager.

The site just flat out didn’t work. Here is what I did:

1. Verify the service is running and listening on a port

(At the command prompt)
TELNET 192.168.1.16 8080
GET /

If this returns HTML then a web server was listening on the new IP address and port. This however didn’t return anything, which meant there was a problem.

2. Look at Windows Task Manager for a w3wp.exe process running under the account that the new App Pool was setup to run under. App Pools will display in Task Manager this way—but not in this case, which means that a call to the server couldn’t reach iis to spawn a new process.
3. This has all the makings of a firewall problem, but there was no firewall running (I disabled to troubleshoot this)

Solution

4. Next I found a tip on google to use netsh to setup the ip address to be used by iis

C:\netsh

netsh>http
netsh http>sho iplisten

IP addresses present in the IP listen list:
-------------------------------------------

192.168.1.27

netsh http>add iplisten ipaddress=192.168.1.16

IP address successfully added

netsh http>sho iplisten

IP addresses present in the IP listen list:
-------------------------------------------

192.168.1.27
192.168.1.16

netsh http>

Problem solved!