IIS7 problem with migrated site

Soldato
Joined
10 Oct 2003
Posts
5,518
Location
Wiltshire
Hi,

I've got a Classic ASP website that I've been tasked with moving to an IIS 7.5 platform from an older Win2003 server (IIS 6).

I've got the main part of the site working fine, but it utilises custom error pages to redirect SEO-friendly URLs to the right pages.

This is sortof working but it has quirks that didn't exist on IIS 6, which I don't know how to reapply in IIS 7.x.

- User goes to http://www.website.com/shop/some-category/page.asp?a=1&b=2&c=3
- This URL doesn't exist on server so browser is redirected to custom 404 page which works out what script needs to be called
- Script is called - e.g. http://www.website.com/shop/category.asp?cat=some-category - or whatever
- Most of the URLs that go to the website would be handled by this script, very few links go to real files.

There is also a custom 500 (Internal Server Error) page that displays a friendly error and emails various details to sysadmin.

Both pages work fine in isolation, the problem becomes when there is an internal server error on wherever the custom 404 page has redirected to. It doesn't work at all - I just get a blank page back from the browser, seemingly like the custom 404 page has taken over but the custom 500 page doesn't.

Put simply:
- A actual file called "badpage.asp" in the root directory with an obvious scripting error (e.g. If tjkshksgkj) will call the custom 500 error page properly. e.g. Going to http://www.website.com/badpage.asp shows the custom 500 error page.
- A non-existant SEO friendly URL gets handled by the custom 404 page fine
- A page handled by the custom 404 page that ends up having an internal server error on (something that the custom 500 page should handle) shows a blank page.

I should also point out that by blank page I mean zero content. The content length is 0 bytes.

Things I can't do:
- Use a proper URL Rewriting module. The custom 404 page does things besides just a simple redirect that can't be trivially reworked to accommodate a more "pro" URL Rewriting solution.
- "lol Fix every single possible internal server error". There are many vectors where an 500 error could occur, some are being fixed as time goes on, but I obviously need to be able to return something friendly other than a blank page.

Any help gratefully received!
 
I feel your pain. I've had to write and then setup a 'friendly URL' routing system in classic ASP on IIS and it is an ABSOLUTE nightmare. Because no pages exist, there is absolutely no way to debug it other than getting lucky with some response.writes in the right places to try and follow the route.

All I can say here which could be of some help is that if you ware getting a blank page with 0 bytes, it means that the page which you are trying to server.transfer() to either cannot be found, or does not exist.

Good luck!
 
Back
Top Bottom