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. Extending Principal and Identity object

Extending Principal and Identity object

Scheduled Pinned Locked Moved ASP.NET
comquestion
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
    Sebastien Lachance
    wrote on last edited by
    #1

    I want to extend these object, but keeping the functionnality of WindowsPrincipal and WindowsIdentity. I believe it's not that simple ? Sébastien Lachance - My Blog

    A 1 Reply Last reply
    0
    • S Sebastien Lachance

      I want to extend these object, but keeping the functionnality of WindowsPrincipal and WindowsIdentity. I believe it's not that simple ? Sébastien Lachance - My Blog

      A Offline
      A Offline
      Andy Brummer
      wrote on last edited by
      #2

      If they aren't sealed then it shouldn't be that difficult. Just derive classes from windowsidentity and windowsPrincipal. On the Application_Authenticated event. Construct a new identity and principal of your type from the existing windows objects and then replace both Thread.CurrentPrincipal and HttpContext.User and you should be good to go. If they are sealed, then just encapsulate them instead of derive from them.


      I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

      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