Creating IIS Virtual Directories
To run the ASP.Net web applications on localhost by using the URL like http://localhost/project_name you must have your web application directory configured with virtual directory in IIS. To configure the virtual directory you can follow these steps:
IIS Virtual Directories in IIS 5
1. Open run command type inetmgr and press enter to open the IIS manager.
2. Expand local computer ⇒ Web Sites ⇒ Default Web Site.
3. Right click on Default Web Site go to New ⇒ Virtual Directory.
4. It will open the virtual directory creation wizard. Click next to continue.
5. Type the alias for the virtual directory. Use the same name for the alias that you used to create the web application project or its directory in wwwroot folder of inetpub. Click next…
6. Then browse to locate the directory of your web application to bind it with virtual directory to publish the content inside it.
7. Then click next and assign the access permissions such as read, write, execute, browse or run scripts and finish to complete the virtual directory wizard.
IIS Virtual Directories in IIS 7
1. To create the virtual directory in Windows Vista, open the inetmgr as in above case and then expand the Default Web Site.
2. Go to the directory of web site under the Default Web Site node.
3. Right click on the Web Directory, click convert to Web Application.
In the Advanced options you can set your application for using the Default pool of ASP.Net.
Continue to next tutorial: Unable to Start Debugging on the Web Server to learn how to enable the debugging on web server.