Web-server – Why does IIS refuse to serve ASP.NET content

asp.netiis-6web-server

My Windows Server 2003 Std server refuses to server ASP.NET content. It serves regular html just fine but anything .net, even a one line html file with an ASPX extention fails silently.

Things I've tried:

  • Nothing in the event log or IIS WWW logs when it fails.
  • Fiddler shows no response
  • I reinstalled .NET with
    • C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -U
    • C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -I
  • I give obscenely high permissions on everything I can think of (full control, read, write, etc.) to all possibly relevant users (IUSER*, ASP.NET, etc.).
  • I confirmed that ASP.Net v1 and v2 Web Service Extensions are "allowed" in IIS
  • Confirmed that the Server Manager had IIS and ASP.Net roles enabled

Again: this is the scenario:

Any guidance will be much appreciated!


Solution: I reinstalled per the instructions below and it works now. Thanks all!

Best Answer

I've run into this exact issue several times, and every time, the solution was to:

  1. go to the Control Panel
  2. go to the "Windows Components" area
  3. remove IIS, let it uninstall
  4. reboot
  5. re-add IIS (make sure to include the ASP.NET stuff when you check off the boxes).
  6. Run: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -I

I spent hours debugging this at a client site once, and that was the trick. Since then, every time this has happened, this was the fix.

I'm not sure what the root cause is, but we tore the IIS configuration apart once trying to figure it out, and even had Microsoft RDC'ing into the server in question for 2 or 3 hours, and they couldn't help either.

So I write it off as an undocumented bug in ASP.NET/IIS.