Inspirations, captions, ideas and notes.

Are you using Windows XP and having problems with viewing your .asp pages via localhost?  If you’re having trouble viewing your ASP.NET / .ASP pages, and can swear that IIS has been installed successfully like I did (hah), perhaps these steps will help you, like they helped me.

I was able to view the .asp site while the debugger in Visual Web Developer 2008 was on and the project was open.  Once the project was closed, or if I was not in Visual Web Developer, I get this error message when trying to view the same site through “http://localhost/sitename/about.aspx”

The page cannot be found…

Page Cannot Be Found

Page Cannot Be Found

It’s possible serving of ASP and ASP.NET pages have been prohibited.  To resolve this,

  1. Click on [Start], select “Run” and you’ll see the Run dialog box open.
  2. Type “inetmgr” and click [OK] to open your Internet Information Services (IIS) Manager.
  3. In the left panel of the IIS Manager, click on [+] next to your computer name, to expand the menu tree.
  4. Click on “Web Service Extensions” to display the list of web service extensions in the right panel.
  5. You will see “Active Server Pages” and “ASP.NET v2.0…” listed in the right panel along with their current status.  Mine were “Prohibited” on both counts.
  6. If the status is “Prohibited”, click on the service you wish to allow, e.g. “Active Server Pages”, and click on the [Allow] button.  This changes the status to “Allowed”.  I selected “allowed” for “ASP.NET v2.0…” as that is what I need.
  7. You should be able to view your .ASP site via “http://localhost/sitename/” by now.

These were the steps I used, and they worked for me.  I hope you’ll find them helpful.  Good luck! 🙂

Addon – 28 May 2009 11:55am

Just to add, if you have completed the steps above and have made some progress but encounter this error:

“Server Error in ‘/’ Application”

Server Error In '/' Application

Server Error In '/' Application

It is possible the site has not been setup properly still. At the IIS manager (see earlier steps for opening the IIS manager and expanding the menu tree), click on [+] for “Application Pools”, and then for “DefaultAppPool”.  If you only see “Default Application” and no other application names that resembles your site name, follow these steps as well:

  1. In the extended menu tree of the IIS Manager, click on [+] “Web Sites” and then [+] “Default Web Site” to reveal the list of sites currently in your wwwroot folder.
  2. Right-click on the site you wish to setup to be viewed in using IIS via “localhost”, e.g. [+] Testsite1, and select “Properties” to open the properties window for your site.
  3. The Properties window has several tabs, namely, Directory, Documents, etc.  Make sure the “Directory” tab is selected.  If the Application name label and text field is greyed out, click on [Create] next to it.  The label and text field is no longer grayed out and your sitename (e.g. Testsite1) appears in the text field.
  4. Click on [OK] to confirm and close the site properties window.
  5. Now, you should be able to view your site using the “localhost” url through your internt browser. E.g. http://localhost/Testsite1/Default.aspx

Once again, these steps worked for me, I hope they work for you too.  Feel free to drop me a note if you wish to add or suggest anything.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: