c# - Preventing Cross-Site Request Forgery (CSRF) Attacks -


i've read below link , understand except 1 part. asked question in comment on link, nobody responded.

http://www.asp.net/web-api/overview/security/preventing-cross-site-request-forgery-(csrf)-attacks

where call "validaterequestheader"?

can please able answer this?

depends if using mvc or webapi validate request.

for web api put in message handler.

and mvc put in action filter.

that way request validated before reaches controller's action method , since cross cutting concern can applied controller or action decorating attribute.

mvc has [validateantiforgerytoken] attribute built. think webapi need handroll own.


Comments

Popular posts from this blog

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -