IAntiforgery.SetCookieTokenAndHeader(HttpContext) 方法

定义

生成并存储一个防伪造 Cookie 令牌(如果令牌不可用或无效)。

public:
 void SetCookieTokenAndHeader(Microsoft::AspNetCore::Http::HttpContext ^ httpContext);
public void SetCookieTokenAndHeader (Microsoft.AspNetCore.Http.HttpContext httpContext);
abstract member SetCookieTokenAndHeader : Microsoft.AspNetCore.Http.HttpContext -> unit
Public Sub SetCookieTokenAndHeader (httpContext As HttpContext)

参数

httpContext
HttpContext

HttpContext与当前请求关联的 。

适用于