Where I can Find some Example about Security.Principal and Security.Permissions?
I want to develop a Winform login form and Webform login page and manage their security.I want to know how and how much this 2 namespaces help me.
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Give you are using windows forms, your best bet will be to use the WindowsPrincipal class. Do you have access to an active directory? What are you trying to secure?
If your app just uses a flat file for the database, all you really need is to set an ACL on the file it uses, windows will stop any app, not just yours from accessing the file. Or do you need to access resources remotely, like WCF, SQL, Web services.
We need a little info and we can give you a better answer. But in lieu of that, you are definately better off not writing any code other than a check of the user’s group or WindowsPrincipal.IsAdministrator for instance as a check in your app. If that’s the route you are going to take, then you need to consider UAC in Windows Vista/7.
More info please: