Link to home
Start Free TrialLog in
Avatar of Dovberman
DovbermanFlag for United States of America

asked on

HTTP Error 404.0 - Not Found

I built web sites using VS 2008 and VS 2010.  VS 2012 is different.
I started a new website named StockProNew.  An About page was automatically created.
The app compiled and ran.

Then I renamed About.aspx to AboutUs.aspx and viewed it in the browser. The page displayed properly.  The app compiled and ran until I clicked on the link to the AboutUs page.

<ul>
            <li><a runat="server" href="~/">Home</a></li>
            <li><a runat="server" href="~/AboutUs">AboutUs</a></li>
            <li><a runat="server" href="~/Contact">Contact</a></li>
        </ul>

Error:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Most likely causes:
•The directory or file specified does not exist on the Web server.


Module
   IIS Web Core

Notification
   MapRequestHandler

Handler
   StaticFile

Error Code
   0x80070002


Requested URL
   http://localhost:56720/About

Physical Path
   c:\users\dovberman\documents\visual studio 2012\Projects\StockProNew\StockProNew\About

AboutUs.aspx does exist as expected. About.aspx does not exist as expected.

Why is the app still looking for About.aspx?

http://localhost:56720/AboutUs.aspx displays the page.

How can I fix this?
Avatar of Kumaraswamy R
Kumaraswamy R
Flag of India image

<li><a runat="server" href="~/About/AboutUs">AboutUs</a></li>
What kind of project did you select when you first created the solution?
ASKER CERTIFIED SOLUTION
Avatar of Dovberman
Dovberman
Flag of United States of America image

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
Cannot simply modify a page that was automatically created.
Sure you can.

User generated image
I don't understand why your hrefs don't have the ".aspx" extension. Did you enable URL rewriting?
Avatar of Dovberman

ASKER

My solution worked.