module 3: managing web applications with iis 7.0

30
Module 3: Managing Web Applications with IIS 7.0

Upload: patience-manning

Post on 19-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Module 3: Managing Web Applications with IIS 7.0

Module 3:Managing Web Applications

with IIS 7.0

Page 2: Module 3: Managing Web Applications with IIS 7.0

Overview

Explain management approaches for IIS 7.0

Use the IIS 7.0 configuration system

Grant non-administrative users access to IIS 7.0 configuration settings

Page 3: Module 3: Managing Web Applications with IIS 7.0

Lesson 1: Managing IIS 7.0

Explain management approaches for IIS 7.0

Use appcmd.exe to perform basic administration tasks

List methods for configuring IIS 6.0 compatibility

SSL Configuration

Requesting SSL Certificates

Renewing SSL Certificates

Importing and Exporting Certificates

Page 4: Module 3: Managing Web Applications with IIS 7.0

IIS Manager

Configure IIS settings

Install and remove IIS features

Control delegation

Remote administration

Extensible

Page 5: Module 3: Managing Web Applications with IIS 7.0

Appcmd.exe

C:\> appcmd list requestsREQUEST "fb0000008000000e" (url:GET /wait.aspx?time=10000,time:4276 msec,client:localhost)

C:\> appcmd list requestsREQUEST "fb0000008000000e" (url:GET /wait.aspx?time=10000,time:4276 msec,client:localhost)

Quick, efficient access to new IIS 7.0 configuration

Mirrors *.vbs files from IIS 6.0

Built-in “pipe” support

C:\> appcmd list sitesSITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started)SITE "Site1" (id:2,bindings:http/*:81:,state:Started)SITE "Site2" (id:3,bindings:http/*:82:,state:Stopped)

C:\> appcmd list sitesSITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started)SITE "Site1" (id:2,bindings:http/*:81:,state:Started)SITE "Site2" (id:3,bindings:http/*:82:,state:Stopped)

Page 6: Module 3: Managing Web Applications with IIS 7.0

Compatibility

WMIv2 and ADSI Scripts Supported

Installing Metabase compatibility easy

Admin Base Object (ABO) calls mapped to new

configuration system

Relies on Inetinfo.exe service

Page 7: Module 3: Managing Web Applications with IIS 7.0

Requesting SSL Certificates

Obtain a certificate

Create the SSL Binding

Verify the SSL Binding

Configure SSL Settings

Page 8: Module 3: Managing Web Applications with IIS 7.0

Renewing SSL Certificates

Page 9: Module 3: Managing Web Applications with IIS 7.0

Importing and Exporting Certificates

Page 10: Module 3: Managing Web Applications with IIS 7.0

Lesson 2: Using Hierarchical Configuration Settings

Describe the IIS 7.0 configuration system

Describe the function and format of section groups

Describe the function and format of sections

Describe the function and format of elements

Describe the function and format of collections

Describe the function and format of attributes

Describe the function and format of locations

Described the hierarchy of configuration files

Describe the IIS 7.0 configuration file schema

Work with schema files

Page 11: Module 3: Managing Web Applications with IIS 7.0

IIS 7.0 Configuration Concepts

Main configuration in applicationHost.config

Consistent with ASP.NET web.config

Two main groupings of settings:

system.applicationHost

system.webServer

Page 12: Module 3: Managing Web Applications with IIS 7.0

Section Groups

<system.webServer>

<defaultDocument enabled="true">

<files>

<add value="Default.htm" />

<add value="Default.asp" />

<add value="index.htm" />

<add value="index.html" />

<add value="iisstart.htm" />

<add value="default.aspx" />

</files>

</defaultDocument>

</system.webServer>

Page 13: Module 3: Managing Web Applications with IIS 7.0

Sections

<system.webServer>

<defaultDocument enabled="true">

<files>

<add value="Default.htm" />

<add value="Default.asp" />

<add value="index.htm" />

<add value="index.html" />

<add value="iisstart.htm" />

<add value="default.aspx" />

</files>

</defaultDocument>

</system.webServer>

Page 14: Module 3: Managing Web Applications with IIS 7.0

Elements

<system.webServer>

<defaultDocument enabled="true">

<files>

<add value="Default.htm" />

<add value="Default.asp" />

<add value="index.htm" />

<add value="index.html" />

<add value="iisstart.htm" />

<add value="default.aspx" />

</files>

</defaultDocument>

</system.webServer>

Page 15: Module 3: Managing Web Applications with IIS 7.0

Collections

<system.webServer>

<defaultDocument enabled="true">

<files>

<add value="Default.htm" />

<add value="Default.asp" />

<add value="index.htm" />

<add value="index.html" />

<add value="iisstart.htm" />

<add value="default.aspx" />

</files>

</defaultDocument>

</system.webServer>

Page 16: Module 3: Managing Web Applications with IIS 7.0

Attributes

<system.webServer>

<defaultDocument enabled="true" >

<files>

<add value="Default.htm" />

<add value="Default.asp" />

<add value="index.htm" />

<add value="index.html" />

<add value="iisstart.htm" />

<add value="default.aspx" />

</files>

</defaultDocument>

</system.webServer>

Page 17: Module 3: Managing Web Applications with IIS 7.0

Locations

<location path="MyWebSite" overrideMode="Allow">

<system.webServer>

<defaultDocument enabled="true">

<files>

<add value="index.htm" />

<add value="iisstart.htm" />

<add value="default.aspx" />

</files>

</defaultDocument>

</system.webServer>

</location>

Page 18: Module 3: Managing Web Applications with IIS 7.0

Hierarchy of Configuration Files

.NET Framework settings

Sites

machine.config

root web.config

applicationHost.config

ASP.NET settings

Main IIS 7.0 settings

web.configOptional

web.config

web.config

Applications

Virtual Directories

Page 19: Module 3: Managing Web Applications with IIS 7.0

Lesson 3: Delegating Configuration to Non-Administrator Users

Grant non-administrative users access to IIS 7.0 configuration settings.

Lock individual configuration settings in IIS 7.0.

Describe default locking configuration for IIS 7.0 configuration settings.

Describe locking <location> sections.

Implement granular locking.

Describe lockAttributes & lockAllAttributesExcept.

Describe the function of lockElements.

Describe the function of lockElements add remove clear statements.

Page 20: Module 3: Managing Web Applications with IIS 7.0

IIS 7.0 Programming

New managed code API

Access and control the server configuration Manage top-level server objects Access certificate and registration information Access state information at runtime Access configuration settings at runtime

Page 21: Module 3: Managing Web Applications with IIS 7.0

Locking Configuration Settings

You can allow non administrators to:

Modify configuration properties Override configuration properties

overrideMode: Defines the lockdown state of a configuration section

Page 22: Module 3: Managing Web Applications with IIS 7.0

Default Locking of Sections

Defined in <configSections>

Use overrideModeDefault

<configSections>...<section name="defaultDocument"

overrideModeDefault="Allow" />...</configSections>

<configSections>...<section name="defaultDocument"

overrideModeDefault="Allow" />...</configSections>

Page 23: Module 3: Managing Web Applications with IIS 7.0

Locking <location> Sections

<location path="MySite" overrideMode="Deny"> <system.webServer> <defaultDocument/> </system.webServer> </location>

<location path="YourSite" overrideMode="Deny"> <system.webServer> <defaultDocument enabled="true"> <files> <clear/> <add value="default.aspx"/> </files> </defaultDocument> </system.webServer> </location>

<location path="MySite" overrideMode="Deny"> <system.webServer> <defaultDocument/> </system.webServer> </location>

<location path="YourSite" overrideMode="Deny"> <system.webServer> <defaultDocument enabled="true"> <files> <clear/> <add value="default.aspx"/> </files> </defaultDocument> </system.webServer> </location>

Page 24: Module 3: Managing Web Applications with IIS 7.0

Granular Locking

Unlocking a section allows any part of it to be changed by application or site owners

With granular locking you can restrict changes to specific elements or attribute settings

You can also restrict the type of change to add, remove, or modify

Page 25: Module 3: Managing Web Applications with IIS 7.0

lockAttributes & lockAllAtributesExcept

Specifies attributes that are locked

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true" lockAttributes="enabled"> <files> <add value="index.htm" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true" lockAttributes="enabled"> <files> <add value="index.htm" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

Locked

Page 26: Module 3: Managing Web Applications with IIS 7.0

lockElements

Specifies elements that are locked

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true" lockElements="files"> <files> <add value="index.htm" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true" lockElements="files"> <files> <add value="index.htm" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

Locked

Page 27: Module 3: Managing Web Applications with IIS 7.0

lockElements add remove clear

Limits what can be done to an element

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true" <files lockElements="add“> <add value="index.htm" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true" <files lockElements="add“> <add value="index.htm" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

Elements cannot

be added

Page 28: Module 3: Managing Web Applications with IIS 7.0

lockItem

Locks a single item

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true"> <files> <add value="index.htm" lockItem="true" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

<location path="MyWebSite" allowOverride="Allow"><system.webServer> <defaultDocument enabled="true"> <files> <add value="index.htm" lockItem="true" /> <add value="iisstart.htm" /> </files> </defaultDocument></system.webServer></location>

Locked

Page 29: Module 3: Managing Web Applications with IIS 7.0

Locking Summary

lockAttributes

lockAllAttributesExcept

lockElements

lockAllElementsExcept

lockItem

Page 30: Module 3: Managing Web Applications with IIS 7.0

IIS Manager and Delegation

Control feature delegation

Configuration section locking Permit users to use IIS manager IIS Manager features can be hidden from view

Manage site and application administrators

Manage IIS Manager users