共用方式為


IAntiforgery.SetCookieTokenAndHeader(HttpContext) 方法

定義

如果無法使用或無效,則產生並儲存反forgery 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 目前要求相關聯的 。

適用於