Taking a break from my .net. A company that we worked with decided to give up an old ASP site that we had been using on their domains, problem is that some of it wasn’t working correctly, so it was up to me to fix it. I’ve never messed with ASP before but it’s pretty straight forward and we didn’t want to spend alot of time on it and with it having about 50 pages we also didn’t want to rewrite it in .net, so fixing was the only option.
Getting IIS6.0 to run ASP pages
First problem was that our server was only serving asp.net pages so I needed to configure it to also server up ASP pages, luckly this is a quick fix..
To enable ASP pages
- In IIS Manager, expand the local computer, and then click Web Service Extensions.
- In the details pane, click Active Server Pages, and then click Allow.
Next problem.. The ASP site worked correctly on my localhost (XP) but once it was put onto the server, pages wouldn’t load and no error was shown, just an error 500 (HTTP 500 – Internal server error)
Showing ASP Errors on the Server
This was a bit more complicated, MS doesn’t want to show any ASP errors because this could help hackers debug and break into your server. But without the errors how are we as developers to fix what’s broken? (and don’t say a good coder doesn’t have errors lol). I finally found how to show ASP errors on a webserver or at least how to show HTTP 500 Errors for ASP:
To use the 500-100.asp file for error handling on the nondefault Web site, perform the following steps:
- Start the Internet Service Manager (ISM), which loads the Internet Information Services snap-in for the Microsoft Management Console (MMC).
- Right-click the appropriate Web site, click New, and then click Virtual Directory.
- In the Virtual Directory Creation Wizard, click Next. In the Alias text box, type IISHelp, and then click Next.
- When you are prompted for the path to the content directory, click Browse, select the WINNT\Help\IisHelp folder, and then click Next.
- On the Access Permissions page, accept all the defaults, click Next, and then click Finish.
- Right-click the Web site again, and then click Properties.
- On the Custom Errors tab, select the 500;100 error line, and then click Edit Properties.
- In the Message Type list box, select URL, and then type /iisHelp/common/500-100.asp in the URL text box.
- Click OK twice to return to the ISM.
This worked perfectly, I can now see my errors, quickly fix my errors and delete the above.