tags:

views:

101

answers:

2

Today we tried to put an ASP.NET application I helped to develop on yet another production machine. But this time we got a very weird error.

First of all, from all the ASP.NET pages, only Login.aspx was working. The rest just show a blank screen when they should have redirected to Login.aspx. The HTTP response is 200, but no content.

Even worse - when I try to enter the address of some inexistent ASPX page, I also get HTTP 200! Or, when I enter gibberish in some existing ASPX page code (which should have been accessible without login) I also get HTTP 200.

If I enter the name of some inexistent resource (like asdasd.jpg), I get the expected 404.

The redirect to login page is written manually in Global.asax. That's because the application has to use some alternate methods of authentication as well, so I can't just use Forms Authentication. I would suspect that Global.asax is failing, if not for the working Login page.

Noteworthy facts are also that this machine is both a Domain Controller and has SharePoint installed on it. Although the website in question is listed in SharePoint's exception list.

+4  A: 

I would check the following:

  1. Is the application within a virtual application or its own site and not just a virtual directory?
  2. Does the application have it's own App Pool? If it does not then is the app pool shared by apps in a different .net version.
  3. Is the .net version of the application the correct one? 1.1 or 2.0?
  4. Do the files in the file system have the correct permissions to be accessed via IIS?
  5. Have you performed an IIS Reset?
  6. Create a stand alone test.aspx page within your folder that just displays the date/time and check it works.
  7. Make this single test.aspx page perform an exception (eg. divide by zero) and see what the outcome is.
Robin Day
Vilx-
I would suggest creating a new App Pool for this application. The pooling helps to share resources but having an extra one or two will not make a huge impact on any performance. It may actually help. It's only when you're in the realms of 10-20+ applications that Pool Sharing comes into it's own.
Robin Day
A: 

More information required. What Op Sys? What mode IIS running under? What version of .Net? What version of SharePoint? (Why are you using your DC as a web host?)

Does it work on the other production machines you've deployed to? If so what is different between this machine and the working ones? Did you deploy the same way?

Are you sure your hitting the right machine? Are you sure your hitting the right web site? What ISAPI components are installed globally and for the web site? Is .aspx mapped to the ASP.Net ISAPI filter? Do you have any HTTP Modules or HTTP Handlers configured? Can you change the global aspx to write out some messages so you can be sure the piece of code you interested in is reaching?

Anything coming up on the IIS log or the event logs?

Addition:

What version of .Net?

By the sounds of it the .jpg request is being dealt with by IIS directly which is why you get the 404, but the .aspx request is being dealt with by something else which except for you login page, is always returning 200.

Assuming .aspx is wired correctly to .Net the the order of processing is based on ISAPI filters (high to low then global before site), then the ASP.Net ISAPI Extension (sorry I said this was a filter earlier but it's actually an extension). Then we get into the ASP.Net pipeline based on your .Net configs, and calls the HTTP Application (which includes your global.asax code), any HTTP Modules followed finally by a HTTP Handler. Your ASP.Net web forms are just fancy HTTP Handlers.

However, the request can be responded to and terminated from any point.

Since your code works on other machines though, I'm tempted to point a finger at SharePoint if it isn't installed on the working machines. Is this SharePoint 2007? That is also an ASP.Net application (I don't think 2003 was).

Swanny
Vilx-
IIS 6 (Win2003) has a IIS5 compatability mode. The name of the ASP.Net worker process will tell us which mode your running.
Swanny