HttpModuleAction Class [IIS 7 and higher]
Represents an ASP.NET module.
Syntax
class HttpModuleAction : CollectionElement
Methods
This class contains no methods.
Properties
The following table lists the properties exposed by the HttpModuleAction class.
Name |
Description |
---|---|
Name |
A read-only string value that specifies the name of an ASP.NET module. The key property. |
Type |
A read/write string value that specifies the type for an ASP.NET module.
Note:
The type reference is formed as follows (items in brackets are not required): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z] (for example, "ExampleNamespace.ExampleType, Example.Assembly, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%").
|
Subclasses
This class contains no subclasses.
Remarks
Instances of this class are contained in the HttpModules property of the HttpModulesSection class.
The modules represented by the HttpModuleAction class are specific to ASP.NET and are in the <system.web> section of the Web.config file. These modules are contained in the Modules array property of the HttpModulesSection class.
The modules represented by the ModuleAction class are IIS 7 related and are in the <system.webServer> section of the ApplicationHost.config file. These modules are contained in the ModulesSection class.
Example
The following example displays the HttpModuleAction values that are in the HttpModules property of the HttpModulesSection class.
' 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 HttpModuleAction instances.
WScript.Echo "------[ Http Modules ]------"
For Each oHttpModule In oSection.HttpModules
WScript.Echo "Name: " & oHttpModule.Name
WScript.Echo "Type: " & oHttpModule.Type
WScript.Echo
Next
Inheritance Hierarchy
HttpModuleAction
Requirements
Type |
Description |
---|---|
Client |
Requires IIS 7 on Windows Vista. |
Server |
Requires IIS 7 on Windows Server 2008. |
Product |
IIS 7 |
MOF file |
WebAdministration.mof |
See Also
Reference
CollectionElement Class [IIS 7 and higher]
HttpModulesSection Class [IIS 7 and higher]