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. How to pass username of window authentication to web application.

How to pass username of window authentication to web application.

Scheduled Pinned Locked Moved Web Development
securityhelptutorial
3 Posts 3 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
    sabby2006
    wrote on last edited by
    #1

    Hi All, I have a web based application with Windows Authentication. I need to pass the user name of windows authenticated user to the web application say keep the username in session. How is this possible any help would be create. Thanks is Advance

    Regards

    S T 2 Replies Last reply
    0
    • S sabby2006

      Hi All, I have a web based application with Windows Authentication. I need to pass the user name of windows authenticated user to the web application say keep the username in session. How is this possible any help would be create. Thanks is Advance

      Regards

      S Offline
      S Offline
      Sasa Dragicevic
      wrote on last edited by
      #2

      Hi, In ASP.NET code, in Global.asax.vb file, Sub Session_start add the following lines: If User.Identity.IsAuthenticated Then Session("username") = User.Identity.Name End If Session("username") will keep the windows username in the session. Rgds, Saša

      1 Reply Last reply
      0
      • S sabby2006

        Hi All, I have a web based application with Windows Authentication. I need to pass the user name of windows authenticated user to the web application say keep the username in session. How is this possible any help would be create. Thanks is Advance

        Regards

        T Offline
        T Offline
        The Man from U N C L E
        wrote on last edited by
        #3

        you can always get the current user details from the context object. No point storing them in a session variable. As for passing the user name to the web app, how do you thing windows authentication works? It does it for you.

        If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

        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