We help IT Professionals succeed at work.
Get Started

Debugging Web Apps in VS 2005 results in "Page Not Found" (404) Error

kmoloney asked
Last Modified: 2008-01-09

NOTE:  I'm relatively new to Visual Studio 2005, especially developing Web Apps therein, so please try to be patient and explicit with your responses.  

SYNOPSIS OF PROBLEM:  A web application developed in Visual Studio 2005 suddenly returns a "Page Not Found" 404 Error when debugging.  Debugging was not an issue prior to an application crash.  Now, if a new site is developed, this problem does not exist; however, all previously developed website solutions exhibit this problem.  This is, obviously, a very critical issue.


I've been developing a web application (ASP.NET solution) called "ISRFinal" using Microsoft Visual Studio 2005 (Visual Basic), ASP.NET version 2.0.50727, a local database in Microsoft SQL Express, and IIS Version 5.1.  The application is file-based (i.e., the files are in C:\Program Files\Microsoft Visual Studio 2005\Projects\ISRFinal\, not hosted on the IIS server (C:\Inetpub\wwwroot\ - or "localhost"), but I assume it calls at least some component of IIS when it debugs, e.g., when started, the URL was http://localhost:XXXX/Default.aspx, where XXXX was some four digit number, like 1125 or 3328.

Anyway, for some unknown reason, I am no longer able to debug this application (I previously had debugged the program numerous times, with no problems).  The first time that I noticed that something goofy was going on was when Visual Studio 2005 hung up during an attempt to debug, and after about five minutes I performed a CTRL+ALT+DELETE to terminate Visual Studio.  I then received the following error VB Compiler error message:

   [Microsoft (R) Visual Basic Compiler]
   Microsoft (R) Visual Basic Compiler has encountered a problem and needs to close.  We are sorry for the inconvenience.

   No information has been lost.  Check the compiler output for possible ways to avoid this error.
   Please tell Microsoft about this problem.
   We have created an error report that you can send to help us improve Microsoft (R) Visual Basic Compiler.  We will treat this report as confidential and anonymous.
   [Debug]  [Send Error Report]  [Don't Send]


Now, I can load the application fine, and view all the forms and code as well (Designer, Source, and VB Modules).  Web configuration (with aspnetdb.mdf) appears to work fine and users and roles created are still all there.  My start-up page is default.aspx, which has no design elements, simply a "response.redirect" in the "Form_Load) event to a different login page.


Selecting "Start Debugging" from the "Debug" menu item results in in a standard Microsoft Internet Explorer 404 Page, i.e.,

   The Page Cannot be Found
   The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.


   Please try the following:

   If you typed the page address in the Address bar, make sure that it is spelled correctly.

   Open the localhost:1125 home page, and then look for links to the information you want.
   Click the  Back button to try another link.
   Click  Search to look for information on the Internet.

   HTTP 404 - File not found
   Internet Explorer

When I click on the link to localhost:1125, I get the following dialog box:

Security Warning
The current Web Page is trying to open a site in your Trusted sites list.  Do you want to allow this?

Current Site:  C:\Windows\system32\shdoclc.dll
Trusted Site:  localhost

[Yes]   [No]


Warning:  allowing this can expose your computer to security risks.  If you don't trust the current web page, choose No.


I trust the page, of course, so I click 'YES'...and get the following web page:

Server Error in '/ISRFinal' Application.

HTTP Error 404 - Not Found.

Version Information: ASP.NET Development Server


This never happened before, and I'm in some pretty freakin dire straits if I can't figure out a fix to this problem.


I also did some checking on some other websites, new and old.  If I create a new website, I don't get this problem, but loading and debugging previous applications (which have not been deployed) results in the same error.


One word....help!
Watch Question
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE