I get "anti-forgery form field" error when i display list of custom data into kendo ui into 3.6

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 лет назад
i done to list data on list using 3.5 nopcommerce project but in 3.6 i get below error. now what can i do to ignore or solve this error.

The required anti-forgery form field "__RequestVerificationToken" is not present.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Mvc.HttpAntiForgeryException: The required anti-forgery form field "__RequestVerificationToken" is not present.

Source Error:


Line 43:            
Line 44:             var validator = new ValidateAntiForgeryTokenAttribute();
Line 45:             validator.OnAuthorization(filterContext);
Line 46:         }
Line 47:     }


Source File: f:\Sangeet Shah\Project\nop3_6\Presentation\Nop.Web.Framework\Security\AdminAntiForgeryAttribute.cs    Line: 45
8 лет назад
mukumarshah wrote:
i done to list data on list using 3.5 nopcommerce project but in 3.6 i get below error. now what can i do to ignore or solve this error.

The required anti-forgery form field "__RequestVerificationToken" is not present.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Mvc.HttpAntiForgeryException: The required anti-forgery form field "__RequestVerificationToken" is not present.

Source Error:


Line 43:            
Line 44:             var validator = new ValidateAntiForgeryTokenAttribute();
Line 45:             validator.OnAuthorization(filterContext);
Line 46:         }
Line 47:     }


Source File: f:\Sangeet Shah\Project\nop3_6\Presentation\Nop.Web.Framework\Security\AdminAntiForgeryAttribute.cs    Line: 45


Just add an anti-forgery token to the View. Look at other plugins. ;)
8 лет назад
i try to add anti-forgery token to the my view where i want to display my data list. but still error occure.
8 лет назад
i think after adding anti token in your view where your data list is display then try to compare your 3.5's data list view and 3.6 view where data will display using kendo grid.
8 лет назад
i want to display only data using kendo grid. and in kendo grid where i use  anti-forgery token key.

if i want to add this then where i use it in kendo grid.
my issue is still not solve.
i try all think from google and read much articles and nop commerce support question and answare but i can't get my ans aware from it.
8 лет назад
I got the same problem i have write same as in product edit page's product attribute inline kendo grid.


read: {
                                url: "@Html.Raw(Url.Action("ProductAttributeCombinationList", "Product", new { productId = Model.Id }))",
                                type: "POST",
                                dataType: "json",
                                data: addAntiForgeryToken
                            },


i have checked there controller action method they have nothing write code related to antiforgerytoken. They just write in kendo same as i have show in above code.

i have done same but i got error so is anything need to add in controller action method.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.