Tuesday, January 25, 2011

Working with virtual directory in asp.net

Step to Create a virtual directory in asp.net web application:

Step 1:
 Right click on the project and Click on publish web site. Give there the Target Path and check the first 2 check boxes and Copy the Taget location.

Step 2:
 Then GO to Start -> Run ->inetmgr

It will open the Internet Information Services window.
Then expand your local directory and Right click on the web site then New -> Virtual directory. It will show the Virtual Directory wizard. Click Next.

Then Give an alisa name for the website and click on Next.Then enter the published path and then ok. This will finish.

To test it Right click on a form and then Browse it will show the page and if you want to give  to other user then just change the localhost with the ip of your computer and then other users can browse.

Hope this will be helpful.