1
votes

I've moved a Classic asp site from IIS 6 to a new server on Windows 2008 Server IIS 7.5.

While custom 404 handling and 500 error handling works, runtime errors due to bad URLs do not get handled.

For instance, hitting this: www.mysitename.com/<

Will give a runtime error; on the old server IIS 6 would treat it as a 404. What am I missing?

1

1 Answers

1
votes

Issue resolved. In this case the site will eventually move to .NET and in the transition will be a mix of classic asp and C#.NET code, so the site is setup to handle both in IIS.

In IIS there's two sections of Error Pages configuration for custom error handling (in the ASP.NET area and the IIS area). Classic asp runtime errors (for instance, an array subscript error) will be handled by the Error Pages setup in the IIS section. But bad URL handling still gets handled by the .NET engine, so the example of www.mysitename.com/< gets handled by the ASP.NET Error Pages configuration.

So the fix was in the ASP.NET area, Error Pages -> Edit Feature Settings and setting a Default Page to a custom page did the trick (or alternately getting more granular by error type), and setting the Mode to Remote Only (or simply On, if desired).