G
Guest
Hi,
I have a problem with WindowsPrincipal.IsInRole. I have heard that in version 1.0 of the framework it was case sensitive, but now its not.
However, I'm having a problem that seems to be related to case sensitivity in version 1.1 of the framework. It's like this:
- I create a local group on my development machine
- I add myself (i.e. my domain account) to that group. My account is of the form MYDOMAIN\RuskJ
- If I then re-open that group (in the Computer Management console) I see that the member of that group is now listed as "MYDOMAIN\Ruskj". Notice that the last letter is now lower case, even though it was upper case beforehand. I think this is the cause of the problem.
- If I call IsInRole for my new group, it always returns false.
- If I use reflection to invoke _GetRoles, I can see that the role I created is not listed.
- However, another local role IS listed. If I open that role I see that my account is listed there with the "correct" captialisation - i.e. MYDOMAIN\RuskJ".
In summary, it appears that in .NET 1.1, IsInRole is case insensitive on group names, but still case SENSITIVE with regard to the users who are in those groups.
E.g. IsInRole("machine\TestGroup") and IsInRole("machine\TESTGROUP") do, correctly, return the same value.
However, it returns true if MYDOMAIN\RuskJ is a member of that group, but false if MYDOMAIN\Ruskj (different capitalisation but same user) is a member of that group.
I may be missing something trivial here, and if I am please let me know. For instance, why am I displayed with different capitalisation in different groups? On the other hand, it could be a real bug. Can anyone confirm ....?
I'm using Visual Studio 2003 on Windows XP Pro.
Thanks!
I have a problem with WindowsPrincipal.IsInRole. I have heard that in version 1.0 of the framework it was case sensitive, but now its not.
However, I'm having a problem that seems to be related to case sensitivity in version 1.1 of the framework. It's like this:
- I create a local group on my development machine
- I add myself (i.e. my domain account) to that group. My account is of the form MYDOMAIN\RuskJ
- If I then re-open that group (in the Computer Management console) I see that the member of that group is now listed as "MYDOMAIN\Ruskj". Notice that the last letter is now lower case, even though it was upper case beforehand. I think this is the cause of the problem.
- If I call IsInRole for my new group, it always returns false.
- If I use reflection to invoke _GetRoles, I can see that the role I created is not listed.
- However, another local role IS listed. If I open that role I see that my account is listed there with the "correct" captialisation - i.e. MYDOMAIN\RuskJ".
In summary, it appears that in .NET 1.1, IsInRole is case insensitive on group names, but still case SENSITIVE with regard to the users who are in those groups.
E.g. IsInRole("machine\TestGroup") and IsInRole("machine\TESTGROUP") do, correctly, return the same value.
However, it returns true if MYDOMAIN\RuskJ is a member of that group, but false if MYDOMAIN\Ruskj (different capitalisation but same user) is a member of that group.
I may be missing something trivial here, and if I am please let me know. For instance, why am I displayed with different capitalisation in different groups? On the other hand, it could be a real bug. Can anyone confirm ....?
I'm using Visual Studio 2003 on Windows XP Pro.
Thanks!