HttpHandlerActionCollection::Add Method
Adds an HttpHandlerAction object to the collection.
Assembly: System.Web (in System.Web.dll)
Parameters
- httpHandlerAction
- Type: System.Web.Configuration::HttpHandlerAction
The HttpHandlerAction object to add to the collection.
| Exception | Condition |
|---|---|
| ConfigurationException | The HttpHandlerAction object to add already exists in the collection or the collection is read-only. |
Before using this method you must create an HttpHandlerAction object and initialize it with the proper name and type. After that, you can add the object just created to the collection.
Note |
|---|
ASP.NET searches for the handler assembly DLL in the application's private Bin directory first, and then it searches in the system assembly cache. |
The collection must not already contain an HttpHandlerAction object with the same Verb and Path properties.
The following code example shows how to create an HttpHandlerAction object and add it to the collection.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note