problem with .IsInRole

Discussion in 'ASP .Net' started by =?Utf-8?B?UGV0ZXI=?=, Jan 25, 2005.

  1. Hello!

    I have a strange problem with .IsInRole method. When I use this method on my
    development machine everything works fine. However when I deploy my
    application on a production server this method does not work correct.

    I use the following code:

    String DefaultAdminRole = @"dom\admgroup";
    String UserName="";
    WindowsPrincipal AuthenticatedUser = User as WindowsPrincipal;

    if (null!=AuthenticatedUser)
    {

    UserName = AuthenticatedUser.Identity.Name;

    if (!AuthenticatedUser.IsInRole(@"dom\admgroup")){
    Response.Write("You do not have permissions!");
    }

    else
    {

    Response.Write("You have permissions");

    }

    IsInRole is always false on production server, no matter who user is...

    My development machine is Windows XP with IIS 5.1
    Production server is Windows 2000 with IIS 5.0

    The Authentication settings in IIS on both machines are excatly the same
    (Windows Ingegrated Authentication).

    Please, could anyone advice me, what could be wrong? Your help is very much
    appreciated!

    Thanks!

    Peter
    =?Utf-8?B?UGV0ZXI=?=, Jan 25, 2005
    #1
    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. arjun

    isInRole Problem

    arjun, Nov 28, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    3,570
    arjun
    Nov 30, 2004
  2. =?Utf-8?B?RGF2ZQ==?=

    IsInRole problem?

    =?Utf-8?B?RGF2ZQ==?=, Mar 24, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,113
    Elton Wang
    Mar 25, 2005
  3. =?Utf-8?B?SnVsaWE=?=

    IsInRole problem

    =?Utf-8?B?SnVsaWE=?=, Dec 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    307
    Patrick.O.Ige
    Dec 5, 2006
  4. Jim McLeod

    ASP.NET Context.User.IsInRole XP Problem

    Jim McLeod, Jun 7, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    133
    Jim McLeod
    Jun 7, 2004
  5. naijacoder naijacoder

    WindowsPrincipal.IsInRole() problem with non-builtin roles

    naijacoder naijacoder, Aug 30, 2004, in forum: ASP .Net Security
    Replies:
    4
    Views:
    250
    Joe Kaplan \(MVP - ADSI\)
    Sep 2, 2004
Loading...

Share This Page