aspnet / AspNetWebStack

ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core)
Other
858 stars 354 forks source link

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

Closed abratv closed 1 year ago

abratv commented 1 year ago

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?

abratv commented 1 year ago

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