HttpHandlerActionCollection.Add(HttpHandlerAction) 메서드

정의

컬렉션에 HttpHandlerAction 개체를 추가합니다.

public:
 void Add(System::Web::Configuration::HttpHandlerAction ^ httpHandlerAction);
public void Add(System.Web.Configuration.HttpHandlerAction httpHandlerAction);
member this.Add : System.Web.Configuration.HttpHandlerAction -> unit
Public Sub Add (httpHandlerAction As HttpHandlerAction)

매개 변수

httpHandlerAction
HttpHandlerAction

HttpHandlerAction 컬렉션에 추가할 개체입니다.

예외

추가할 개체가 HttpHandlerAction 컬렉션에 이미 있거나 컬렉션이 읽기 전용입니다.

예제

다음 코드 예제에서는 개체를 HttpHandlerAction 만들고 컬렉션에 추가하는 방법을 보여줍니다.

// Add a new HttpHandlerAction to the Handlers property HttpHandlerAction collection.
httpHandlersSection.Handlers.Add(new HttpHandlerAction(
    "Calculator.custom", 
    "Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler", 
    "GET", 
    true));
' Add a new HttpHandlerAction to the Handlers property HttpHandlerAction collection.
httpHandlersSection.Handlers.Add(new HttpHandlerAction( _
    "Calculator.custom", _
    "Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler", _
    "GET", _
    true))

설명

이 메서드를 사용하기 전에 개체를 HttpHandlerAction 만들고 적절한 이름과 형식으로 초기화해야 합니다. 그런 다음 컬렉션에 방금 만든 개체를 추가할 수 있습니다.

메모

ASP.NET 먼저 애플리케이션의 private Bin 디렉터리에서 처리기 어셈블리 DLL을 검색한 다음 시스템 어셈블리 캐시에서 검색합니다.

컬렉션에 동일한 HttpHandlerAction 속성이 Verb 있는 개체가 Path 아직 포함되어 있지 않아야 합니다.

적용 대상