HttpContextExtensions.GetIISServerVariable(HttpContext, String) Método

Definición

Precaución

This is obsolete and will be removed in a future version. Use GetServerVariable instead.

Obtiene el valor de una variable de servidor para la solicitud actual.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetIISServerVariable(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ variableName);
public static string GetIISServerVariable (this Microsoft.AspNetCore.Http.HttpContext context, string variableName);
[System.Obsolete("This is obsolete and will be removed in a future version. Use GetServerVariable instead.")]
public static string GetIISServerVariable (this Microsoft.AspNetCore.Http.HttpContext context, string variableName);
[System.Obsolete("This is obsolete and will be removed in a future version. Use GetServerVariable instead.")]
public static string? GetIISServerVariable (this Microsoft.AspNetCore.Http.HttpContext context, string variableName);
static member GetIISServerVariable : Microsoft.AspNetCore.Http.HttpContext * string -> string
[<System.Obsolete("This is obsolete and will be removed in a future version. Use GetServerVariable instead.")>]
static member GetIISServerVariable : Microsoft.AspNetCore.Http.HttpContext * string -> string
<Extension()>
Public Function GetIISServerVariable (context As HttpContext, variableName As String) As String

Parámetros

context
HttpContext

Contexto http de la solicitud.

variableName
String

El nombre de la variable.

Devoluciones

null si el servidor no admite la IServerVariablesFeature característica. Puede devolver null o estar vacío si la variable no existe o no está establecida.

Atributos

Comentarios

Para obtener una lista de variables de servidor comunes disponibles en IIS, vea http://go.microsoft.com/fwlink/?LinkId=52471.

Se aplica a