Best Practice for Handling Cross Site Request Forgery in Custom Application
- Last UpdatedJun 06, 2024
- 1 minute read
To handle Cross Site Request Forgery in custom applications, add the below code if you are using AVEVA Work Tasks 2020 or a later version:
-
In case the webapp is not anonymous,
AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier;
-
In the aspx page, under the form tag,
<%=System.Web.Helpers.AntiForgery.GetHtml()%>