[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

HTTP Error 404.0 - Not Found

Posted on 2013-05-23
5
Medium Priority
?
473 Views
Last Modified: 2013-05-28
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?
0
Comment
Question by:Dovberman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 39190474
<li><a runat="server" href="~/About/AboutUs">AboutUs</a></li>
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39190553
What kind of project did you select when you first created the solution?
0
 

Accepted Solution

by:
Dovberman earned 0 total points
ID: 39190829
A website project was selected.

Cannot simply modify a page that was automatically created. These pages are not recognized by the site master.

I imagine the development structure has been changed to support conversion to run on mobile devices.

Solution:

1. Add a new web form as follows:

  Right click the project name. Select "Add". Then Select "Add Form using Master Page.

Name the new page. ie. AboutUs1.aspx

2. Edit the new web form:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="AboutUs1.aspx.cs" Inherits="StockProNew.AboutUs1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
       <ul>
            <li><a id="A1" runat="server" href="~/">Home</a></li>
            <li><a id="A2" runat="server" href="~/AboutUs1">AboutUs1</a></li>
            <li><a id="A3" runat="server" href="~/Contact">Contact</a></li>
        </ul>
</asp:Content>

The new page is recognized by the site master.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39191085
Cannot simply modify a page that was automatically created.
Sure you can.

Screenshot
I don't understand why your hrefs don't have the ".aspx" extension. Did you enable URL rewriting?
0
 

Author Closing Comment

by:Dovberman
ID: 39200633
My solution worked.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question