Impersonate user with trusted connection to SQL Server
From: Burkhard Vogt (b.vogt@esteps.de)
Date: 09/18/02
- Next message: Willy Denoyette [MVP]: "Re: Trouble using DuplicateToken for a delegation-capable token"
- Previous message: Tony Chow: "Re: Trouble using DuplicateToken for a delegation-capable token"
- Next in thread: Willy Denoyette [MVP]: "Re: Impersonate user with trusted connection to SQL Server"
- Reply: Willy Denoyette [MVP]: "Re: Impersonate user with trusted connection to SQL Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Burkhard Vogt" <b.vogt@esteps.de> Date: Wed, 18 Sep 2002 08:49:07 -0700
Hi!
I'm trying to change the user accunt on a WinForms
application.
I use Win32-Api LogonUser to create a new WindosIdentity-
Object 'newuser'.
Then I call newuser.Impersonate() to change the users
identity in the AppDomain.
This all works fine and WindowsIdentity.GetCurrent()
returns the new user.
The problem is, if I try to establish a connection to SQL
Server with 'truested_connection=yes' in the connect
string the application trys to logon with NT-
AUTHORITY/ANONYMUS (no user).
Any idea?
- Next message: Willy Denoyette [MVP]: "Re: Trouble using DuplicateToken for a delegation-capable token"
- Previous message: Tony Chow: "Re: Trouble using DuplicateToken for a delegation-capable token"
- Next in thread: Willy Denoyette [MVP]: "Re: Impersonate user with trusted connection to SQL Server"
- Reply: Willy Denoyette [MVP]: "Re: Impersonate user with trusted connection to SQL Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]