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. General Programming
  3. C#
  4. Windows authentication

Windows authentication

Scheduled Pinned Locked Moved C#
questioncsharpsecurity
3 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.
  • M Offline
    M Offline
    Mr Perfect
    wrote on last edited by
    #1

    Dear All, Please let me know how can I implement Windows Authentication for a windows application using c# ? Thanx & Regards

    C 2 Replies Last reply
    0
    • M Mr Perfect

      Dear All, Please let me know how can I implement Windows Authentication for a windows application using c# ? Thanx & Regards

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Mr Perfect wrote:

      Please let me know how can I implement Windows Authentication for a windows application using c# ?

      Well, it should already be running in the context of the user that launched it. So you just need to get hold of the current Identity:

      using System.Security.Principal;
      ...
      WindowsIdentity wi = WindowsIdentity.GetCurrent();

      From there you can get hold of various information that you would likely find useful.


      Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website

      1 Reply Last reply
      0
      • M Mr Perfect

        Dear All, Please let me know how can I implement Windows Authentication for a windows application using c# ? Thanx & Regards

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        If there was something wrong with the answer I gave, please let me know. Don't vote me down indiscriminately.


        Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton 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