S
S
Sasha Pleshakov2016-09-03 18:43:02
HTML
Sasha Pleshakov, 2016-09-03 18:43:02

What is the hidden field generated by the AntiForgeryToken helper used for?

The helper generates such code. What is it for?

<input name="__RequestVerificationToken" type="hidden"
 value="JIh0jc3H_LbPxMT1fIeUvC1gyeOxqER5-jKB67XffXdGzxd79HcQEUUn9kbfBey6AahaO9M_PeGYOz_qbaHw_MHTNwrRtt4jrybTaJ63FKY1" />

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mirus36, 2016-09-03
@mnepoh

To protect against CSRF attacks

R
RouR, 2016-11-06
@RouR

In order to be protected, the method must be marked with [ValidateAntiForgeryToken]
metanit.com/sharp/mvc/8.6.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question