HttpContext.GetConfig(String) 方法

定義

警告

The recommended alternative is System.Web.HttpContext.GetSection in System.Web.dll. http://go.microsoft.com/fwlink/?linkid=14202

傳回目前 HTTP 要求的要求組態資訊。

public:
 System::Object ^ GetConfig(System::String ^ name);
public object GetConfig (string name);
[System.Obsolete("The recommended alternative is System.Web.HttpContext.GetSection in System.Web.dll. http://go.microsoft.com/fwlink/?linkid=14202")]
public object GetConfig (string name);
member this.GetConfig : string -> obj
[<System.Obsolete("The recommended alternative is System.Web.HttpContext.GetSection in System.Web.dll. http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.GetConfig : string -> obj
Public Function GetConfig (name As String) As Object

參數

name
String

要求資訊的組態標記。

傳回

Object

指定的 ConfigurationSection;如果區段不存在,則為 null;如果在執行階段無法存取區段,則為內部物件。 (會將傳回的物件轉換成適當的組態類型再使用)。

屬性

備註

GetConfig 方法已被取代。 GetSection使用 方法來取得目前 HTTP 要求的組態資訊。

適用於

另請參閱