HttpContextExtensions.GetIISServerVariable(HttpContext, String) Metodo

Definizione

Attenzione

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

Ottiene il valore di una variabile server per la richiesta corrente.

C#
public static string GetIISServerVariable (this Microsoft.AspNetCore.Http.HttpContext context, string variableName);
C#
[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);
C#
[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);

Parametri

context
HttpContext

Contesto HTTP per la richiesta.

variableName
String

Nome della variabile.

Restituisce

null se il server non supporta la IServerVariablesFeature funzionalità. Può restituire null o vuoto se la variabile non esiste o non è impostata.

Attributi

Commenti

Per un elenco delle variabili server comuni disponibili in IIS, vedere http://go.microsoft.com/fwlink/?LinkId=52471.

Si applica a

Prodotto Versioni (obsoleto)
ASP.NET Core 2.2 (3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0)