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. Impersonating And Reverting

Impersonating And Reverting

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netwindows-adminhosting
1 Posts 1 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.
  • M Offline
    M Offline
    mlauahi
    wrote on last edited by
    #1

    Im am not sure exactly how to handle this. Most of this was from Microsoft direct. I am hosting a web site. Microsoft had us set up a different ASP.NET Account under which to run IIS. We changed the machine.config file to reflect this new account in the processmodel line. Everything works as designed. When impersonation is off in the web.config file it shows the current user thread as this this ASP.NET account user. When impersonation is on, the calling user is shown on the thread. I need to keep impersonation on, I want to know who my current caller identity is, but when it calls for going to another resoource in my case a printer I want to go out and use this resource as the ASP.NET account. With impersonate on, I then need to impersonate this ASP.NET account for going out to print. I do not want to add everyone to this printer resource. I used the API call to LOGONUSER and passed the token into WindowsIdentity and this works as well. The catch comes in that whatever account calls LOGONUSER and then trys to impersonate this ASP.NET account must have "Act On Behalf Of Operating System" rights. Am I making this more difficult than needs to be. How do I keep impersonation on for identity purposes, but still make use of this ASP.NET account for going outside of my web site to a printer??? Thanks a lot in advance

    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