IIS Configuration


IIS must be configured before you run a Web application with it. In the following Try It Out, you create a Website with the Internet Information Services Admin tool. To begin, your Website needs a virtual directory, which is the directory used by the client accessing the Web application. For example, http:// server/mydirectory, mydirectory is a virtual directory. The virtual directory is completely independent of the physical directory where the files are stored on the disk. For example, the physical directory for mydirectory can be d:\someotherdirectory.

To configure a Website with IIS, you first have to create a new virtual directory, which you do in the following Try It Out.

Try It Out – Create a New Website

image from book
  1. Start the Internet Information Services Admin tool. You can find this tool in the Control Panel, in Administrative Tools.

  2. Open the Default Web Site in the tree view of the IIS tool.

  3. Select the menu Action New Virtual Directory.... The Virtual Directory Creation Wizard starts (see Figure 21-4).

    image from book
    Figure 21-4

  4. After clicking the Next button, you can select the name for the virtual directory (see Figure 21-5). Enter the name BegVCSharpWebsite in the Alias text box. This is how the directory is accessed from the browser (http://servername/BegVCSharpWebsite). Click the Next button.

    image from book
    Figure 21-5

  5. In the next dialog (see Figure 21-6), you can select the physical directory that is referenced by the virtual directory's name. Select an empty directory for the Website. You can also create a new directory. If you click the Browse button, you will find the button Make New Folder to create a new physical directory.

    image from book
    Figure 21-6

  6. You configure the access permissions with the dialog shown in Figure 21-7. For ASP.NET applications, permissions for reading and running scripts are usually enough. Write permission allows users to write files to the Website. If want users to be able to upload files to the Website, you should configure a separate directory where users have write permissions. If Browse is enabled, the user gets a listing of the files on the directory.

    image from book
    Figure 21-7

  7. Click the Next button, read the configuration summary, and click the Finish button.

  8. After the Virtual Directory is created, you can see the properties of the Website. Select BegVCSharpWebsite in the tree view of the IIS Admin tool. You might have to refresh the view before this virtual directory shows up. Then select the menu options Action Properties. You can see the virtual directory configuration (shown in Figure 21-8).

    image from book
    Figure 21-8

  9. Select the ASP.NET tab in this configuration (see Figure 21-9). Here you have to configure the version of the ASP.NET runtime that should be used for the Website.

    image from book
    Figure 21-9

image from book

Now the virtual directory is configured, and it is possible to copy or publish the Web application to this Website.




Beginning Visual C# 2005
Beginning Visual C#supAND#174;/sup 2005
ISBN: B000N7ETVG
EAN: N/A
Year: 2005
Pages: 278

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net