IsInRole does not work as expected

G

Guest

Hi,

I created a local group on server and added my self to that group.

I am using the following code in my web page to check the membership of the
loggedin user against the Windows group on the same server.

User.IsInRole(@'MachineName\groupName') . The above always return me false.
If i restart my machine then this returns true. Any clue why?

MachineName - is same as the server name on which the code is being run.

Windows Authentication is enabled and i checked the User.Identity and that
is coming correct and as expected. Subsequently i want to extend this to
check for some thing like DOMAIN\WINDOWSGROUP.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top