Hi MrProgrammer_78
I have to agree with the post from _duDE_. I do not think it is that simple solution provided by Magnus Montin in
his article. Magnus is Microsoft MVP which means he has some solid and proven knowledge of .NET technologies. In addition, the article has been reviewed by a Microsoft Partner. For me it means something already.
I do not know what your formal requirements on security are. But I have to tell you that last week I implemented custom authentication and authorization based on the Magnus Montin's article and the article from Elvin Cheng at Code Project (
here). You may also browse into the comments to the article where I described how to implement the dynamic authorization.
From your posts above I have the feeling we both are working on similar type of application - more or less standalone application with connection to one or more databases with a security map (user roles vs. access rights) where WPF controls gets hidden/visible or enabled/disabled based on the user's security context. I am working on such application(s) but for different industry. With combining these approaches I successfully implemented and tested the security in my application.
You may browse through the Elvin's article (and maybe Magnus' article again) to reconsider if you still need to stick to implementing several applications instead of just one. My security implementation fit into 12 short classes and 3 database tables (+ some administration/management UI).
Please let me know should you have more questions.
Greetings
Jiri Novotny