Link to home
Start Free TrialLog in
Avatar of kmoloney
kmoloneyFlag for United States of America

asked on

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

Hello,

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.

DETAILS:

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]
================================


CURRENT STATUS WHEN PROJECT IS LOADED:

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.

WHEN I DEBUG:

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 8.0.0.0

=============================================

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

EFFECT ON OLD AND NEW WEB APPLICATIONS:

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.

SUMMARY

One word....help!
Avatar of kmoloney
kmoloney
Flag of United States of America image

ASKER

I reinstalled Visual Studio 2005 (two hours) - and still the same problem exists.
I solved the problem.  The error was caused by the existence of an "app_offline.htm" file in the root of the project.

See http://www.spaanjaars.com/QuickDocId.aspx?quickdoc=369 for more information.

Sometimes tiny little things can cause terrible problems.
ASKER CERTIFIED SOLUTION
Avatar of PashaMod
PashaMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial