L
landesjoe
Hi,
Here's the problem:
We have an app that we open by default for the user logged into the
Windows box on a Windows Domain (using active directory). Let's say
that's "Hans".
That works great, the .NET app uses that user's identity in the
Tread.Prinicipal object all through the system, including logging into
a SQL2K db where the tables and stored procs use the Windows Account
for authorization regarding execute permissions.
Now there are times where we need to log in as another user, i.e. an IS
person that has much higher permission level. That person's going to be
"Mike". Besides changing the layout of some navigation forms, we also
need to update that context change on the Database access tools such
that the DB now knows that the "NTUserName" is Mike, not Hans anymore.
I have played around with a bunch of MS suggestions regarding
"LogonUser" API call. Every time it comes back with error 1314 (generic
users do not have permission to change User). We can't give our users
that kind of permission.
So, is there another way to do this during run-time, or do I need to
set the principle user before I launch the app to avoid this problem?
Thanks a lot,
Joachim Landes
Here's the problem:
We have an app that we open by default for the user logged into the
Windows box on a Windows Domain (using active directory). Let's say
that's "Hans".
That works great, the .NET app uses that user's identity in the
Tread.Prinicipal object all through the system, including logging into
a SQL2K db where the tables and stored procs use the Windows Account
for authorization regarding execute permissions.
Now there are times where we need to log in as another user, i.e. an IS
person that has much higher permission level. That person's going to be
"Mike". Besides changing the layout of some navigation forms, we also
need to update that context change on the Database access tools such
that the DB now knows that the "NTUserName" is Mike, not Hans anymore.
I have played around with a bunch of MS suggestions regarding
"LogonUser" API call. Every time it comes back with error 1314 (generic
users do not have permission to change User). We can't give our users
that kind of permission.
So, is there another way to do this during run-time, or do I need to
set the principle user before I launch the app to avoid this problem?
Thanks a lot,
Joachim Landes