Question

I am developing a Windows Forms application in C#. I have created user authentication within this application, and I have to restrict access to different functionalities to users depending on their permissions.

Is there a framework that can help me with that?

Was it helpful?

Solution

One of many options:

Unify Windows Forms and ASP.NET Providers for Credentials Management

Possibly the simplest solution is to use Windows role authentication along with database schema to represent what access roles have. The precise implementation depends on your requirements.

OTHER TIPS

Is your application going to run in a Microsoft Domain? (Will your users log into a domain using active directory?)

If so then you can employ the .Net Frameworks System.Security namespace to manage access quite easily.

Here is a Channel 9 overview of System.Security and the MSDN Overview of System.Security.

If you are not on a domain, it is generally not too difficult to validate what ever credentials are available and marshal them into a custom IIdentity & IPrinicipal object that will meet your needs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top