![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, here comes the description of the trouble: I try to guard my code by PrincipalPermissionAttribute (but I did also try to call IsInRole directly and even LsaLookupNames2...). When I ask for role that exists I receive reply "true", which is good. When I ask for role that doesn't exist, I sometimes receive "false", which is also good, and sometimes System.Exception (trust related error), which is not so good - especially in the case of declarative security... Interesting observations: - Query for roles begining with domain name (i.e. "DOMAIN\GROUP") work always OK (returning "true" or "false") - Query for role "Personal" would return "false" - Query for role "PersonalPlus" would throw exception. OS: Windows Vista in domain Did anybody experienced (and solved) this? Thank for your comments. |
#3
| |||
| |||
|
|
if you omit the Domain\ part - local groups are assumed. I know this. What I tried to express is that I would expect the call to |
|
What exact exception do you get (including inner exception) ? There is no inner exception. Just System.Exception with message (I do not |
|
----- Dominick Baier (http://www.leastprivilege.com) Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp) Hello, here comes the description of the trouble: I try to guard my code by PrincipalPermissionAttribute (but I did also try to call IsInRole directly and even LsaLookupNames2...). When I ask for role that exists I receive reply "true", which is good. When I ask for role that doesn't exist, I sometimes receive "false", which is also good, and sometimes System.Exception (trust related error), which is not so good - especially in the case of declarative security... Interesting observations: - Query for roles begining with domain name (i.e. "DOMAIN\GROUP") work always OK (returning "true" or "false") - Query for role "Personal" would return "false" - Query for role "PersonalPlus" would throw exception. OS: Windows Vista in domain Did anybody experienced (and solved) this? Thank for your comments. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |