Personalized Pages Using ServerVariables("LOGON_USER") --> Querying SQL DB behind the scenes.

Last post 10-28-2009 6:21 PM by drewbkilla. 2 replies.

Sort Posts:

  • Personalized Pages Using ServerVariables("LOGON_USER") --> Querying SQL DB behind the scenes.

    09-14-2009, 4:51 PM
    • Member
      3 point Member
    • drewbkilla
    • Member since 07-22-2009, 12:01 PM
    • Posts 6

    On my Intranet, I have (CLASSIC ASP) pages that pull individual users' info from an SQL source.  

    The way I pull the correct data is by utilizing the current (per PC) active directory login and binding it to a hidden field.

    It is then plugged into my query using request.ServerVariables("Logon_user")  as my username field,   once a user hits my page, the server variable pulls only their info by matching their current username with my db of usernames.

    Once the query is complete, the user will be presented with a personalized page that he or she can make edits on.  eliminating the need to use additional login credentials since they're already on the intranet.

    How could the results of the above be implemented in asp.net?

  • Re: Personalized Pages Using ServerVariables("LOGON_USER") --> Querying SQL DB behind the scenes.

    10-26-2009, 4:11 PM
    Answer

    In ASP.NET you can capture the Windows logged in user using:

    me.hidden1.value=Request.LogonUserIdentity.Name()

     

     

     

     

     

  • Re: Personalized Pages Using ServerVariables("LOGON_USER") --> Querying SQL DB behind the scenes.

    10-28-2009, 6:21 PM
    • Member
      3 point Member
    • drewbkilla
    • Member since 07-22-2009, 12:01 PM
    • Posts 6

    Perfect!

    Thanks alot! 

Page 1 of 1 (3 items)