Why would an aspx file return 404 (“The page cannot be found”)

前端 未结 13 1567
日久生厌
日久生厌 2020-12-24 01:42

Why when I access an aspx (e.g., http://www.example.com/foo.aspx - not the real site) through IE6 would I get a 404 Error (i.e., \"The page cannot be found\") in IIS6

<
相关标签:
13条回答
  • 2020-12-24 02:01

    Check that the anonymous user under which the site runs has read access to the file foo.aspx.

    IIS6 and later uses a 404 response, thereby not letting an attacker know whether such a file even exists.

    0 讨论(0)
  • 2020-12-24 02:01

    Check that www.example.com is going to the site that you think it is.

    If you are hosting multiple sites on the same IP using host headers you may want to double check the name you are using is going to the site you think it is.

    0 讨论(0)
  • 2020-12-24 02:03

    ALTERNATE SOLUTION (same error perhaps different cause).

    I had installed Visual Studio 2008 Pro without SQL Express it, and it caused this same error. Reinstallation of VS2008 with sql express included seemed to have corrected the problem, or perhaps the install took other actions. I did try to register ASP.net numerous times prior but no luck however it is definitely the most probable cause Just posting my experience for those pulling their hair as I was..

    Thanks

    0 讨论(0)
  • 2020-12-24 02:04

    Check for double quote errors. I started getting a 404 on a single page because I accidentally had this:

    <asp:TemplateField HeaderText="ImageURL"">

    instead of this:

    <asp:TemplateField HeaderText="ImageURL">

    0 讨论(0)
  • 2020-12-24 02:08

    I got this issue when I tried using a different drive to host my apps. I ended up moving them to the wwwroot folder because it was working there and I did not have to time figure out why it is not working on the E:\ drive.

    0 讨论(0)
  • 2020-12-24 02:10

    It could be a lot of things. I had this issue today because .NET had not been re-initialized after installing IIS (aspnet_regiis -i -enable or equivalent).

    0 讨论(0)
提交回复
热议问题