Condividi tramite


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.

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

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