News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

How to: Create and Configure Virtual Directories in IIS 5.0 and 6.0

Started by dhilipkumar, Dec 12, 2008, 09:50 PM

Previous topic - Next topic

dhilipkumar

How to: Create and Configure Virtual Directories in IIS 5.0 and 6.0

You can use IIS Manager to create a virtual directory for an ASP.NET Web application that is hosted in IIS 5.0, IIS 5.1, and IIS 6.0. A virtual directory appears to browsers as if it were contained in a Web server's root directory, even though it can physically reside somewhere else. This approach enables you to publish Web content that is not located under the root folder of a Web server, such as content that is located on a remote computer. It is also a convenient way to set up a site for local Web development work, because it does not require a unique Web site for each virtual directory. This topic explains how you can create a virtual directory and configure it to run ASP.NET pages. 



You must create a virtual directory as part of an existing IIS Web site. This can be either the default Web site that is created when IIS is installed, or a Web site that you have created. For more information about how to install and configure IIS, or about how to create a Web site, see the IIS Help or the online IIS product documentation on the Microsoft TechNet Web site.

As an alternative to creating a virtual directory for a Web application, you can create a new Web site. For details about how to create a Web site in IIS Manager, see How to: Create and Configure Local ASP.NET Web Sites in IIS 6.0.
Creating the Virtual Directory

Follow one of the procedures that are described in How to: Open IIS Manager topic to open IIS Manager. You can then create a virtual directory.
To create a virtual directory by using IIS Manager

   1.      In IIS Manager, expand the local computer and the Web site to which you want to add a virtual directory.
   2.      Right-click the site or folder in which you want to create the virtual directory, click New, and then click Virtual Directory.
   3.      In the Virtual Directory Creation Wizard, click Next.
   4.      In the Alias box, type a name for the virtual directory and then click Next. Choose a short name that is easy to type, because users type this name to access the Web site.
   5.      In the Path box, type or browse to the physical directory that contains the virtual directory, and then click Next.

      You can select an existing folder or create a new one to contain the content for the virtual directory.

   6.      Select the check boxes for the access permissions that you want to assign to the users.

      By default, the Read and Run Scripts check boxes are selected. These permissions enable you to run ASP.NET pages for many common scenarios. For more information, see the next section in this topic.
   7.      Click Next and then click Finish.

To configure security and authentication for a virtual directory

   1.      In IIS Manager, right-click node for the virtual directory that you want to configure, and then click Properties.
   2.      Click the Directory Security tab, and then in the Authentication and access control section, click Edit.
   3.      Select the check box for the authentication method or methods that you want to use for your virtual directory, and then click OK. By default, the Enable anonymous access and Windows Integrated Authentication check boxes are already selected.

      The two most common authentication scenarios are as follows:
          *            Windows Integrated authentication for a local intranet site.
          *            Forms authentication for an Internet or extranet site where users access the site through a firewall.

      To configure authentication for an Internet site, you must configure forms authentication. For more information about authentication options, see ASP.NET Authentication. For a walkthrough that describes how to create a site using Forms authentication, see How to: Implement Simple Forms Authentication.
   4.      To configure authentication for an intranet or local development scenario, clear the Enable Anonymous access check box, and make sure that the Integrated Windows authentication check box is selected.
   5.      In Windows Explorer, open the parent folder of the folder that will contain the pages for the site. Right-click the folder and then click Sharing and Security.

      The Properties dialog box for the folder is displayed.
   6.      Click the Security tab.
   7.      In the Group or user names list, select a group or user name.

8.In the Permissions list, select appropriate permissions for the group or user name.
9.Click Apply.
10.Click OK.

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview