Asp net validating multiple groups
You have more than one AD group that should access to the same resource on your application.Different users belong to different AD groups and all this users need access to the named resource.Data validation is a very important part of any enterprise application. NET has a validation framework but it is very limited in scope and starts falling apart as soon as you need to perform more complex validations. NET validation framework are well documented by Peter Blum on his web site, so we are not going to repeat them here.Peter has also built a nice replacement for the standard ASP.Now in the load event of a page that instantiate more than one instance of a user control with validator I can write.: Hidden Fields are used for storing the Text and Value of the Check Box for sending it back during Form Submission.
This can be accomplished with Authorization Requirements and Handlers.
However, due to possible complexity of the validation rules we decided not to use standard the Spring.
NET configuration schema for validator definitions but to instead provide a more specific and easier to use custom configuration schema for validation.
Making use of Requirement and Handlers available on ASP. In this case, we are using windows authentication and AD groups to authorize user access, but, it can be easily other kind of authorization to fulfill your needs.
You can check the full example at github: https://github.com/devscopeninjas/asp-net-core-2-authorization-requirement https://odetocode.com/blogs/scott/archive/2018/02/20/https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?