0
votes

I'm on .net standard 2.1 and trying to read the server variables from HttpContext calling

context.GetServerVariable(variableName);

I get an error like

'HttpContext' does not contain a definition for 'GetServerVariable' and no accessible extension method 'name' accepting a first argument of type 'type' could be found (are you missing a using directive or an assembly reference?).

I already installed and included

using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;

But the error persist.