Current Logon user for SQL statement

Last post 09-18-2006 6:21 PM by ethebaud. 2 replies.

Sort Posts:

  • Current Logon user for SQL statement

    03-31-2006, 10:03 AM
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134

    Hi,

    In my INSERT SQL statement I am currently use suser_name() as a default to my data field name UserInput, I am using Windows Authenticated at the moment and my newly insert record shown as MyPCName\ASPNET instead of what I am hoping for is MyWindowsDomain\MyAccountID.

    Any help is much appreciated.

    Thanks,

     

  • Re: Current Logon user for SQL statement

    09-14-2006, 5:32 AM
    • Member
      272 point Member
    • elyssa83
    • Member since 06-06-2006, 2:48 AM
    • Penang, Malaysia
    • Posts 56
    I'm facing the same situation. Anybody who concern please help.
    ~ Life is a maze, make sure you find the right path ~
  • Re: Current Logon user for SQL statement

    09-18-2006, 6:21 PM
    • Member
      15 point Member
    • ethebaud
    • Member since 09-13-2006, 5:26 PM
    • Posts 3

    1- Your IIS site should be configured for Windows Authentication

    2- Your application's web.config file should allow impersonation with Windows Authentication by inserting these lines

      

    <authentication mode="Windows"/>

    <identity impersonate="true"/>

     

    Hope this helps.

    Ed

Page 1 of 1 (3 items)