Using Internet Information Services (IIS) Manager, you can create a local Web site for hosting an ASP.NET Web application. This topic explains how you can create a local Web site and configure it to run ASP.NET pages. For additional details about installing and configuring IIS, or creating a Web site, see the IIS Help documentation that is included with the product or the online IIS product documentation on the Microsoft TechNet Web site.
As an alternative to creating a local site, you can also create a virtual directory. This provides a way to host the Web site on one computer, while the actual pages and content of the Web site are contained somewhere other than the root or home directory, such as 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 site identity, which means that it requires fewer steps than creating a unique site. For details, see How to: Create and Configure Virtual Directories in IIS.
Starting IIS Manager
First, you need to start IIS Manager.
NoteImportant
You must be logged on as a member of the Administrators group on the local computer to perform the following procedure (or procedures), or you must have been delegated the appropriate authority.
To start IIS Manager from the Run dialog box
On the Start menu, click Run.
In the Open box, type inetmgr and click OK.
To start IIS Manager from the Administrative Services console
On the Start menu, click Run. In the Run text box, type control panel, and then click OK.
In the Control Panel window, click Administrative Tools.
In the Administrative Tools window, click Internet Information Services.
Creating a Local Web site
Once IIS Manager is started, you can create a site. The following procedures explain how to create a site in IIS version 6.0.
NoteNote
The procedures for creating a local Web site in previous versions of IIS are similar to the following procedures, but differ in a few details. For more information about creating a Web site in other versions, see the IIS Help documentation that is included with your local copy of IIS (type http://localhost/iisHelp/ in your browser address bar and then press ENTER) or the online IIS product documentation for previous versions on the Microsoft TechNet Web site.
To create a local Web site in IIS 6.0
In IIS Manager, expand the local computer, right-click the Web Sites folder, point to New, and click Web Site.
In the Web Site Creation Wizard, click Next.
In the Description box, type a descriptive label for the site (this label is not what you will type in the address bar of a browser), and then click Next.
Type or select the IP address (the default is All Unassigned), TCP port, and host header (for example, www.microsoft.contoso.com) for your site.
NoteImportant
To ensure that user requests reach the correct Web site, you should distinguish each site on the server with at least one of three unique identifiers: a host header name, an IP address, or a TCP port number. Using unique host header names is the preferred way to identify multiple Web sites on a single server. To reach your site, a client must enter the name/IP address pair that is listed for the site in the DNS server, or listed in the local HOSTS file. For more information about choosing unique identifiers, see Hosting Multiple Web Sites on a Single Server in the IIS 6.0 product documentation.
In the Path box, type or browse to the directory that contains, or will contain, the site content, and then click Next.
Select the check boxes for the access permissions that you want to assign to your users, and then click Finish. By default, the Read and Run Scripts check boxes are selected; these permissions enable you to run ASP.NET pages for many common scenarios.
Configuring a Local Web Site
After creating a new local Web site, you can configure it to run ASP.NET pages and configure security. The following table shows the permissions settings that are available in all versions of IIS, including IIS 6.0.
As an alternative to creating a local site, you can also create a virtual directory. This provides a way to host the Web site on one computer, while the actual pages and content of the Web site are contained somewhere other than the root or home directory, such as 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 site identity, which means that it requires fewer steps than creating a unique site. For details, see How to: Create and Configure Virtual Directories in IIS.
Starting IIS Manager
First, you need to start IIS Manager.
NoteImportant
You must be logged on as a member of the Administrators group on the local computer to perform the following procedure (or procedures), or you must have been delegated the appropriate authority.
To start IIS Manager from the Run dialog box
On the Start menu, click Run.
In the Open box, type inetmgr and click OK.
To start IIS Manager from the Administrative Services console
On the Start menu, click Run. In the Run text box, type control panel, and then click OK.
In the Control Panel window, click Administrative Tools.
In the Administrative Tools window, click Internet Information Services.
Creating a Local Web site
Once IIS Manager is started, you can create a site. The following procedures explain how to create a site in IIS version 6.0.
NoteNote
The procedures for creating a local Web site in previous versions of IIS are similar to the following procedures, but differ in a few details. For more information about creating a Web site in other versions, see the IIS Help documentation that is included with your local copy of IIS (type http://localhost/iisHelp/ in your browser address bar and then press ENTER) or the online IIS product documentation for previous versions on the Microsoft TechNet Web site.
To create a local Web site in IIS 6.0
In IIS Manager, expand the local computer, right-click the Web Sites folder, point to New, and click Web Site.
In the Web Site Creation Wizard, click Next.
In the Description box, type a descriptive label for the site (this label is not what you will type in the address bar of a browser), and then click Next.
Type or select the IP address (the default is All Unassigned), TCP port, and host header (for example, www.microsoft.contoso.com) for your site.
NoteImportant
To ensure that user requests reach the correct Web site, you should distinguish each site on the server with at least one of three unique identifiers: a host header name, an IP address, or a TCP port number. Using unique host header names is the preferred way to identify multiple Web sites on a single server. To reach your site, a client must enter the name/IP address pair that is listed for the site in the DNS server, or listed in the local HOSTS file. For more information about choosing unique identifiers, see Hosting Multiple Web Sites on a Single Server in the IIS 6.0 product documentation.
In the Path box, type or browse to the directory that contains, or will contain, the site content, and then click Next.
Select the check boxes for the access permissions that you want to assign to your users, and then click Finish. By default, the Read and Run Scripts check boxes are selected; these permissions enable you to run ASP.NET pages for many common scenarios.
Configuring a Local Web Site
After creating a new local Web site, you can configure it to run ASP.NET pages and configure security. The following table shows the permissions settings that are available in all versions of IIS, including IIS 6.0.
Account or Group | Permissions | ||
---|---|---|---|
Administrators | Full Control | ||
System | Full Control | ||
An
account or group that you choose to give browse access to the site if
you disabled anonymous authentication when you created the virtual
directory. | Read & Execute | ||
The
account configured to access system resources for the ASP.NET current
user context, such as the Network Service account (IIS 6.0) or the
ASPNET account (IIS 5.0 and 5.1) When you are finished configuring the site, you can then add ASP.NET Web pages to the site's directory. To configure security and authentication for a local Web site
| Read & Execute List Folder Contents Read Write |
No comments:
Post a Comment
Note: only a member of this blog may post a comment.