View Complete Thread
  • Server Error in '/' Application - The resource cannot be found.

    Sep 07, 2009 05:57 AM|simonalexander2005|LINK

    Hey Guys,

    I know this is a really common error, and you must be bored of troubleshooting it by now! But here's the situation I have:

    I created an "Asp.Net Web application" for .Net 2.0 using visual studio 2008. I then set up IIS on my local machine (XP SP2), and it runs the website fine.

    Once I copy the files over to a folder on another machine (running windows server 2003), and set it up with identical settings, I get the error:

    <-------

    Server Error in '/' Application.
    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

    Requested URL: /Home.aspx


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433  

    ------>

    The strange thing is, Default.aspx is my home page, which sets some variables, then redirects to Home.aspx (using  Response.Redirect("~/Home.aspx");) without displaying anything to the user. This implies that IIS is finding Default.aspx, then failing to use the redirect.

     

    I have tried other solutions I have come across on the internet, including checking for a trailing / in the local path setting, and ensuring web extensions are enabled.

     

    The log file shows this:

    <-------

     #Software: Microsoft Internet Information Services 6.0
    #Version: 1.0
    #Date: 2009-09-07 09:43:18
    #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2009-09-07 09:43:18 W3SVC632226371 NSL111 127.0.0.1 GET /Home.aspx - 80 - 127.0.0.1 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022) ASP.NET_SessionId=j3whkn45bkiowu45zxfmnguz - localhost 404 0 0 3694 351 15


    2009-09-07 09:43:21 W3SVC632226371 NSL111 127.0.0.1 GET /Default.aspx - 80 - 127.0.0.1 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022) ASP.NET_SessionId=j3whkn45bkiowu45zxfmnguz - localhost 302 0 0 372 588 0


    2009-09-07 09:43:21 W3SVC632226371 NSL111 127.0.0.1 GET /Home.aspx - 80 - 127.0.0.1 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022) ASP.NET_SessionId=j3whkn45bkiowu45zxfmnguz - localhost 404 0 0 3694 597 0
    ------->

     

    Which implies to me that it finds Default.aspx successfully (code 302), but not /Home.aspx (404)

    Any thoughts?

     

    Cheers,

    Simon

    <><~~><>

     

    (note: <------- and -------> show the start and end of copied text, for clarity)

    404 iis 6 iis 404 error .NET .NET 2.0 web application dotnet 2.0 resource cannot be found server error C#