The application completed without reading the entire request body, .net core 2.1.1

后端 未结 10 1355
-上瘾入骨i
-上瘾入骨i 2020-12-14 07:21

I have created a user register controller to register users with repository design pattern. My controller looks like this.

[Route(\"api/[controller]\")]
             


        
10条回答
  •  自闭症患者
    2020-12-14 07:48

    i have same error, check maybe you put (AutoValidateAntiforgeryTokenAttribute) in AddMvc Services

    services.AddMvc(opt => {
    
                //Prevent CSF Attake For POST,PUT,DELETE Verb
                //opt.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
            })
    

提交回复
热议问题