Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Contains ASP.NET modules.
Syntax
class HttpModulesSection : ConfigurationSectionWithCollection  
Methods
The following table lists the methods exposed by the HttpModulesSection class.
| Name | Description | 
|---|---|
| Add | (Inherited from ConfigurationSectionWithCollection.) | 
| Clear | (Inherited from ConfigurationSectionWithCollection.) | 
| Get | (Inherited from ConfigurationSectionWithCollection.) | 
| GetAllowDefinition | (Inherited from ConfigurationSection.) | 
| GetAllowLocation | (Inherited from ConfigurationSection.) | 
| Remove | (Inherited from ConfigurationSectionWithCollection.) | 
| RevertToParent | (Inherited from ConfigurationSection.) | 
| SetAllowDefinition | (Inherited from ConfigurationSection.) | 
| SetAllowLocation | (Inherited from ConfigurationSection.) | 
Properties
The following table lists the properties exposed by the HttpModulesSection class.
| Name | Description | 
|---|---|
| Location | (Inherited from ConfigurationSection.) A key property. | 
| HttpModules | An array of HttpModuleAction values that contain ASP.NET modules. | 
| Path | (Inherited from ConfigurationSection.) A key property. | 
| SectionInformation | (Inherited from ConfigurationSection.) | 
Subclasses
This class contains no subclasses.
Remarks
The modules in the HttpModulesSection class are specific to ASP.NET and are in the <system.web> section of the Web.config file. Each of these modules is represented by an instance of the HttpModuleAction class.
The modules in the ModulesSection class are related to IIS 7 and are in the <system.webServer> section of the ApplicationHost.config file. Each of these modules is represented by an instance of the ModuleAction class.
Example
The following example displays HttpModulesSection properties, including the HttpModuleAction values that are in the HttpModules property.
' Connect to the WMI WebAdministration namespace.  
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")  
  
' Get the HttpModulesSection.  
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")  
oSite.GetSection "HttpModulesSection", oSection  
  
' Display the Path and Location properties.  
WScript.Echo "Path: " & oSection.Path  
WScript.Echo "Location: " & oSection.Location  
WScript.Echo  
  
' Display the HttpModuleAction instances that are contained  
' in the HttpModules property.  
WScript.Echo "----------( Http Modules )----------"  
Counter = 0  
For Each oHttpModule In oSection.HttpModules  
     Counter = Counter + 1  
     WScript.Echo "[" & Counter & "] Name: " & oHttpModule.Name  
     WScript.Echo "Type: " & oHttpModule.Type  
     WScript.Echo  
Next  
  
Inheritance Hierarchy
ConfigurationSectionWithCollection
HttpModulesSection
Requirements
| Type | Description | 
|---|---|
| Client | -   IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 | 
| Server | -   IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 | 
| Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 | 
| MOF file | WebAdministration.mof | 
See Also
ConfigurationSectionWithCollection Class
HttpModuleAction Class
ModuleAction Class
ModulesSection Class