HttpContext.Current.User.IsInRole

Discussion in 'ASP .Net Security' started by Julia, Apr 6, 2005.

  1. Julia

    Julia Guest

    Hi,
    I have a problem when I am using the HttpContext.Current.User.IsInRole...

    This is my code:
    if (HttpContext.Current.User.IsInRole("Admin advanced")) {
    ....
    ....
    }

    Admin advanced is a group in my AD. I think
    HttpContext.Current.User.IsInRole cant handle the white space... Is that so
    and how can I solve this problem?

    Thank
    /julia
    Julia, Apr 6, 2005
    #1
    1. Advertising

  2. Except that it won't be a BUILTIN group, it will be the NETBIOS name of her
    AD domain used here:

    HERDOMAIN\Admin advanced

    Joe K.

    "Nilesh Leuva via DotNetMonster.com" <> wrote in
    message news:...
    > Hi Juliya,
    >
    > You need to try this....
    >
    > HttpContext.Current.User.IsInRole("BUILTIN\\Admin advanced"))
    >
    > --
    > Message posted via http://www.dotnetmonster.com
    Joe Kaplan \(MVP - ADSI\), Apr 6, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Newton
    Replies:
    0
    Views:
    2,865
    Mike Newton
    Jul 23, 2004
  2. =?Utf-8?B?SnVsaWE=?=

    HttpContext.Current.User.IsInRole

    =?Utf-8?B?SnVsaWE=?=, Dec 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    8,576
    Karl Seguin
    Dec 12, 2005
  3. Peter Bons
    Replies:
    1
    Views:
    487
    Patrick.O.Ige
    Mar 31, 2006
  4. Randy
    Replies:
    1
    Views:
    647
    Joe Kaplan \(MVP - ADSI\)
    Sep 2, 2004
  5. Tony

    Dim context As HttpContext = HttpContext.Current

    Tony, Mar 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    295
    Teemu Keiski
    Mar 3, 2004
Loading...

Share This Page