Custom implementation for User.IsInRole??

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Custom implementation for User.IsInRole??

    I have an app where im using FormsAuthenticaton, and doing my own
    authentication against a users table in my db. I have no problem actually
    getting the authentication to work as i want. When the user logs in though,
    it is also pulling out a logical bitmapped set of roles that the user
    belongs to. (1 = User, 2 = Admin, then ANDing and ORing against the
    UserRoles value to determine role membership).

    What i am trying to figure out, is how can i use this role information as
    the role that is verified against an "allowRoles" or "denyRoles" setting in
    the web.config security section?

    Thanks in advance,
    - Arthur Dent.


    Arthur Dent Guest

  2. Similar Questions and Discussions

    1. User.IsInRole is always FALSE
      Hi, I have the following problem... Pre-requisites: Installation of an Asp.net webservice on a IIS5 server (win2k). Anonymous access is not...
    2. isInRole doesn't work for one user, but works for everyone else
      I have an ASP.NET/C# application in which I verify that the current user is a member of a list of roles before giving them access to particular...
    3. ASP.NET Context.User.IsInRole XP Problem
      Hi guys I am having a problem with the following line of code on Windows XP Pro. The variable userRole is a string depicting my role on the local...
    4. User.IsInRole not redirecting
      Hi there, I have been reading up on Authorization and role based security for a couple of days now, and am trying to implement this in my...
    5. Question: COntext.User.IsInRole
      You would set them in your global.asax in the Authenticate event. -- John Saunders Internet Engineer john.saunders@surfcontrol.com "VB...
  3. #2

    Default Re: Custom implementation for User.IsInRole??

    Look at this
    [url]www.codeproject.com/aspnet/formsroleauth.asp[/url]

    --
    Daniel Fisher(lennybacon)
    MCP ASP.NET C#
    Blog: [url]http://www.lennybacon.com/[/url]


    "Arthur Dent" <hitchhikersguideto-news@yahoo.com> wrote in message
    news:uyezVag3EHA.708@TK2MSFTNGP11.phx.gbl...
    >I have an app where im using FormsAuthenticaton, and doing my own
    >authentication against a users table in my db. I have no problem actually
    >getting the authentication to work as i want. When the user logs in though,
    >it is also pulling out a logical bitmapped set of roles that the user
    >belongs to. (1 = User, 2 = Admin, then ANDing and ORing against the
    >UserRoles value to determine role membership).
    >
    > What i am trying to figure out, is how can i use this role information as
    > the role that is verified against an "allowRoles" or "denyRoles" setting
    > in the web.config security section?
    >
    > Thanks in advance,
    > - Arthur Dent.
    >

    Daniel Fisher\(lennybacon\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139