CODEDIGEST
Home Articles CodeDigest Tutorials FAQs
Skip Navigation LinksHome » FAQs » How to Run your Asp.net site from root “/” location (in url) instead of using project directory in Visual Studio 2005, 2008, 2010?   You are not logged in.
Search
 

Technologies
 

How to Run your Asp.net site from root "/" location (in url) instead of using project directory in Visual Studio 2005, 2008, 2010?
Submitted By Bala Murugan
On 4/7/2011 8:11:56 AM
Tags: Interview Questions,Visual Studio  

How to Run your Asp.net site from root "/" location (in url) instead of using project directory in Visual Studio 2005, 2008, 2010?


By default, web application project in visual studio 2005, 2008, 2010 will run the asp.net site from the root directory. For example, http://localhost:1593/Default.aspx


But the Website project in visual studio will include the project directory in the url when executing. Like below, http://localhost:1568/UrlDemo/default.aspx


To make the Website project to run from root "/" directory,
1. Go to solution explorer, click the project node and go to property window(not property pages). Else, you can simple press F4 after clicking the project in solution explorer to get the property window.
2. Change the "Virtual Path" property from the project directory to simply "/".
3. That's it. Execute your application.

 

 

Recent FAQs
  • View All FAQs..