Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASPNET USERS & Membership

ASPNET USERS & Membership

Scheduled Pinned Locked Moved ASP.NET
asp-netsecurityquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sachin Dubey
    wrote on last edited by
    #1

    Hi All... I am using ASPNET MembershipProvider with some Roles. After authentication for user i want to get his Role. how is it possible?? i tried but Roleprovider is giving all users in particular Role.. I want That Logged in User's Role in Session.. Thanks & Regards Sachin

    N 1 Reply Last reply
    0
    • S Sachin Dubey

      Hi All... I am using ASPNET MembershipProvider with some Roles. After authentication for user i want to get his Role. how is it possible?? i tried but Roleprovider is giving all users in particular Role.. I want That Logged in User's Role in Session.. Thanks & Regards Sachin

      N Offline
      N Offline
      Nigel Ferrissey
      wrote on last edited by
      #2

      Once the user is authenticated you can use Roles.IsUserInRole("Role") to find out if they are in a role and GetRolesForUserto find out what roles they are in. This[^] page may help.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups