O
Oleg Boldyrev
Hello all!
I'd like to to impersonate the domain account a web service runs under. I
need this to do a trusted connection to SQL Server.
The current settings for the ASP.NET app are windows authentication and
impersonation. So if I do a trusted connection to SQL Server it would be
in the context of the current user which I don't want.
I like the approach with no global impersonation setting and manual
impersonation when nessessary, like was advised here, but that I can't
change the current global settings because the project is not mine and far
under way, I'm afraid to break something :-\
I feel I would be happy if I could obtain the WindowsImpersonationContext
for the account which runs the working process. If sombody could tell me how
to do this. In fact, all I want to do is to change the current security
context to that of the worker process, execute a sql query and then revert
to the previous context.
I don't want to explicitly set the credentials of any account. Is it
possible?
I'd like to to impersonate the domain account a web service runs under. I
need this to do a trusted connection to SQL Server.
The current settings for the ASP.NET app are windows authentication and
impersonation. So if I do a trusted connection to SQL Server it would be
in the context of the current user which I don't want.
I like the approach with no global impersonation setting and manual
impersonation when nessessary, like was advised here, but that I can't
change the current global settings because the project is not mine and far
under way, I'm afraid to break something :-\
I feel I would be happy if I could obtain the WindowsImpersonationContext
for the account which runs the working process. If sombody could tell me how
to do this. In fact, all I want to do is to change the current security
context to that of the worker process, execute a sql query and then revert
to the previous context.
I don't want to explicitly set the credentials of any account. Is it
possible?