HttpContext.GetAppConfig(String) 方法

定义

警告

此 API 现已过时。

为当前应用程序返回请求的配置信息。Returns requested configuration information for the current application.

public:
 static System::Object ^ GetAppConfig(System::String ^ name);
[System.Obsolete("The recommended alternative is System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection in System.Web.dll. https://go.microsoft.com/fwlink/?linkid=14202")]
public static object GetAppConfig (string name);
static member GetAppConfig : string -> obj
Public Shared Function GetAppConfig (name As String) As Object

参数

name
String

为其请求信息的应用程序配置标记。The application configuration tag for which information is requested.

返回

包含配置信息的对象。An object containing configuration information. (在使用之前,将返回的配置节强制转换为适当的配置类型。)(Cast the returned configuration section to the appropriate configuration type before use.)

属性

注解

GetAppConfig 方法已弃用。The GetAppConfig method has been deprecated. 使用 WebConfigurationManager 类的 GetWebApplicationSection 方法获取当前应用程序的配置信息。Use the GetWebApplicationSection method of the WebConfigurationManager class to get configuration information for the current application.

适用于

另请参阅