aspnet / AspNetWebStack

ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make anti forgery token in asp.net webform compatible with asp.net core 7

abratv opened this issue · comments

In the context of incremental migration, i can make the cookie between asp.net core and asp.net webform compatible
At this moment I can't find a way to make anti forgery token compatible
The only way to make it work is to remove ValidateAntiForgeryToken attribute in asp.net webform site but that is not ideal.

Is there any way we can make it work?

Use this
Microsoft.AspNetCore.Mvc.ValidateAntiForgeryToken
instead of System.Web.Mvc