Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have an ASP.NET page.

(Here[^])


I am trying to get it to link to other pages in the site.

For example, mouse over 'Projects' and then 'Cardington' and the link should take you to another page in the site.

It does not, it merely states:
SQL
Not Found
The requested document was not found on this server.


However, when I run this site through WebMatrix on my machine as a local page it works perfectly well.

The link pages are in the same (main) directory.

Is there something I need to do with the web controls?
Posted
Updated 25-Mar-12 7:33am
v2
Comments
Uday P.Singh 25-Mar-12 13:44pm    
are sure the page you redirecting has the same name i.e "Illustration.vbhtml"?
Dalek Dave 25-Mar-12 13:51pm    
Yes, checked that out.
senguptaamlan 25-Mar-12 17:42pm    
I also checked that the HTML files are also not getting out of the web server the same error...
R. Giskard Reventlov 25-Mar-12 20:43pm    
Are you certain that the file in question is physically present in the root folder of your application?
BTW: what are you building in Rickmansworth?
Dalek Dave 26-Mar-12 4:55am    
We are about to knock up three units in The Drive, Rickmansworth.

Proably going to be 6 or seven bedrooms, all on suite.
They will have triple garage and a small cinema, one with a stable.
Probably going to sell for £1.5M or thereabouts.

Are you still interested?

I've had this problem before and so I'm going to guess that it has something to do with authorization and you're being redirected back to the root directory. Try adding the following to the web.config file in the destination directory:

For a particular page add:
<br />
<location path="[YOUR.FILE]"><br />
  <system.web><br />
    <authorization><br />
      <allow users="*"/><br />
    </authorization><br />
  </system.web><br />
</location><br />

.. or for the whole directory...
<br />
  <system.web><br />
    <authorization><br />
      <allow users="*"/><br />
    </authorization><br />
  </system.web><br />
 
Share this answer
 
Possibly again MIME Type issue. Check this post
ASP.NET Web Pages (Razor) Troubleshooting Guide[^]
 
Share this answer
 
In this case it seems to be caused by a DNS issue. Also because I noticed that visual web developer is not using the same port (something it is not supposed to do). You should edit your hosts file and point the server to the folder containing the website. This could help you.

--Amit
 
Share this answer
 
Try this
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900