ASP.NET left FUBAR for production machine

Today we tried to host an ASP.NET application that I helped develop on another production machine. But this time we got a very strange error.

First of all, from all ASP.NET pages only Login.aspx works. The others just show a blank screen when they should have been redirected to Login.aspx. The HTTP response is 200, but there is no content.

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

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

The redirect to the login page is recorded manually in Global.asax. This is because the application must also use some alternative authentication methods, so I cannot just use forms authentication. I suspect Global.asax is failing if not for the working login page.

It is also noteworthy that this machine is both a domain controller and SharePoint is installed on it. Although this website is listed in the SharePoint exclusion list.

+2


source to share


2 answers


I would check the following:



  • Is the application within a virtual application or its own site, not just a virtual directory?
  • Does the application have its own application pool? If not, then the application pool will be used by applications in a different .net version.
  • Is the .net version of the application correct? 1.1 or 2.0?
  • Are there files on the file system to allow access through IIS?
  • Have you performed an IIS Reset?
  • Create a separate test.aspx page in your folder that just displays the date / time and checks if it works.
  • Make this single test.aspx page throw an exception (for example, split by zero) and see what the result is.
+4


source


Additional information required. What is an operating system? What mode does IIS run in? What version of .Net? What version of SharePoint? (Why are you using your DC as a web host?)

Does it work on other production machines you've deployed on? If so, what's the difference between this machine and the workers? Have you deployed the same way?

Are you sure you have typed the correct car? Are you sure you are on the right website? What ISAPI components are installed globally and for the website? Does .aspx map to ASP.Net ISAPI filter? Do you have HTTP modules or HTTP handlers? Can you change the global aspx to write out some messages so you can make sure the piece of code you're interested in reaches?

Anything appearing in the IIS log or event logs?

Addition:



What version of .Net?

From the sounds of that request, the .jpg is processed directly by IIS, so you get a 404, but the .aspx request is processed by something other than your login page, it always returns 200.

Assuming .aspx is properly connected to .Net, the processing order is based on ISAPI filters (high to low and then global to site) and then ASP.Net ISAPI extensions (sorry I said it was a filter before, but it's actually an extension). We then get into the ASP.Net pipeline based on your .Net configurations and call the HTTP application (which includes your global.asax code), any HTTP modules, followed by an HTTP handler afterwards. Your ASP.Net web forms are just cool HTTP handlers.

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

Since your code works on other machines, I tend to point the finger at SharePoint if it isn't installed on the production machines. Is it SharePoint 2007? It's also an ASP.Net application (I don't think 2003 was).

0


source







All Articles