HttpContextExtensions.GetIISServerVariable(HttpContext, String) Metoda

Definicja

Przestroga

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

Pobiera wartość zmiennej serwera dla bieżącego żądania.

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

Parametry

context
HttpContext

Kontekst http dla żądania.

variableName
String

Nazwa zmiennej.

Zwraca

null jeśli serwer nie obsługuje IServerVariablesFeature tej funkcji. Może zwracać wartość null lub pustą, jeśli zmienna nie istnieje lub nie jest ustawiona.

Atrybuty

Uwagi

Aby uzyskać listę typowych zmiennych serwera dostępnych w usługach IIS, zobacz http://go.microsoft.com/fwlink/?LinkId=52471.

Dotyczy