Question

Is it possible to prevent any unauthorised user to access code or application in desktop application like any web application? Thanks in advance.

Was it helpful?

Solution

If you want to protect your sourcecode, I would use an obfuscator like the free Eazfuscator.NET

http://www.gapotchenko.com/eazfuscator.net

UPDATE: no longer free since June 29, 2012

OTHER TIPS

You can use the imperative PrincipalPermission or the declarative PrincipalPermissionAttribute to assert that a user meets some authorization criteria to invoke a certain method or block of code.

This resource describes how to use this kind of security. In my experience, this pattern works best (where "best" means "easiest to set up") in an ActiveDirectory environment.

http://www.ginktage.com/2010/03/role-based-security-in-net/

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