Hi Sir,
Can you please share code for anti-forgery for security audit purpose. I did it but they are asking to change the token every time the page loads or postback. Please share the code to [email protected]. Or explain here with the complete code asap.
This is the code i used:
- DivCSRF.InnerHtml = AntiForgery.GetHtml().ToString()
- If IsPostBack Then
- Try
- AntiForgery.Validate()
- Catch ex As Exception
- Response.Redirect("~/Unauthorize.aspx", False)
- Exit Sub
- End Try
- End If
Thanks & Regards
Ravi Mishra

Jignesh KumarPosted Apr 25, 2020, 2:20 AM