Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello!!!

I have hosted an application on IIS 7. As the application's Name is vary lengthy ,i want to set a virtual path for the application.

I found some article's on google about setting it. They told me to create a virtual directory and i did but still the virtual path remains same. Please tell me what wrong i am doing here ??
Posted

1 solution

Open IIS Manager by Typing inetmgr on Start Menu or Run.

Click On Sites on the Left navigation of IIS Manager.

Right Click on Site where you want to Add Virtual Path and Choose Add Virtual Directory.

Put the Short Name of Application/Website in Alias Field. and Put the Exact Physical Path of Application in Physical Path Textbox.

If you want user to Connect website with Authorization, Click on Connect As and Type Username and Password. and then Click on OK,

You have set Virtual Directory.

Remember Virtual Path will be Used by IIS not by File System. When you will browse website using http://localhost/AliasName, you can access Virtual Path but if you tried to Access, C:\inetpub\wwwroot\AliasName it will not be available there.
 
Share this answer
 
v2
Comments
ujjwal uniyal 17-Sep-12 2:07am    
I did exactly as u said. I right Clicked on the application under default websites , Added a virtual directory gave it it's alias Name and path and then click Ok. But again when i am right clicking the application and then Manage Application and then Advance settings , it's again showing me Virtual path as \Actual name insted of \Alias Name
John Bhatt 17-Sep-12 3:29am    
It is bit confusing you know. Adding a Virtual Directory means accessing all your Files without showing the name of your Exact Physical Path. This will show all files in Virtual Directory.

http://www.iis.net/learn/get-started/planning-your-iis-architecture/understanding-sites-applications-and-virtual-directories-on-iis#Virtual
ujjwal uniyal 17-Sep-12 3:32am    
That i am understanding but why isn't the virtual path being changed to the alias name instead it's showing the application name. How ever if add a virtual directory under default website and then assign a path of a project to it then it is working

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