« Previous Next »

Thread: User.IsInRole not working in IIS 7 and Windoes server 2008

Last post 11-14-2008 12:40 PM by anilr. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 11-13-2008, 9:54 PM

    • parimaln
    • Not Ranked
    • Joined on 01-24-2008, 7:33 PM
    • Posts 1

    User.IsInRole not working in IIS 7 and Windoes server 2008

    Hi,

    I have a requirement where i have created a group in Active directory and i am part of that group and i wish to validate the logged in user based on the group.

    I have wriiten code in Global.asax:

    if(User.Isinrole(domain\groupname))

             //some action

    else

             //some action

    If i publish this code and run in IIS 6.0, i am properly validated.

    If i run the same code in IIS 7.0 and Windows server 2008, it fails. So i need to do some settinsg in IIS or applictaion web.config file for the same.

    regards,

     

    Parimal

  • 11-14-2008, 12:40 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: User.IsInRole not working in IIS 7 and Windoes server 2008

    What notification in global.asax are you using to run this code?  You are probably running this code before authentication is finished.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (2 items)
Microsoft Communities