M
Marc Scheuner [MVP ADSI]
Folks,
I'm new to ASP.NET development accessing a SQL Server database, and I
was wondering if there's any way in ADO.NET to find out what user
account is being used to access a SQL Server database.
In my case, I have a virtual directory on my IIS server that specifies
a specific user account for anonymous access, and I'd like to be able
to find out which one is being used when I create and open a
SqlConnection to my database. Is there a "SqlConnection.CurrentUser"
property or something similar? Or do I need to use a SQL statement on
the server itself?
Thanks!
Marc
I'm new to ASP.NET development accessing a SQL Server database, and I
was wondering if there's any way in ADO.NET to find out what user
account is being used to access a SQL Server database.
In my case, I have a virtual directory on my IIS server that specifies
a specific user account for anonymous access, and I'd like to be able
to find out which one is being used when I create and open a
SqlConnection to my database. Is there a "SqlConnection.CurrentUser"
property or something similar? Or do I need to use a SQL statement on
the server itself?
Thanks!
Marc