This forum is not used anymore. Please ask new questions to Stack Overflow: https://stackoverflow.com/questions/tag ... ort=newest (use aspnetboilerplate tag).
By myaccount
#19994 Hi

I want call a action with URL from another domain and post a Form Data.

Image

Attribute [DisableAbpAntiForgeryTokenValidation] don't work in this example and I don't want disable :

Code: Select allConfiguration.Modules.AbpWeb().AntiForgery.IsEnabled = false;


and I don't want enable:

Code: Select all        private static void EnableCors()
        {
            var cors = new EnableCorsAttribute("*", "*", "*");
            System.Web.Http.GlobalConfiguration.Configuration.EnableCors(cors);
        }


My Action is:

Code: Select all        [DisableAbpAntiForgeryTokenValidation]
        [HttpPost]
        public async Task<ActionResult> UserCallBack(int id = 1)
        {
            //MY CODE
            return View();
        }


What is best solution for this error?

I'm using ASP.NET MVC 5.x MPA.