Does anyone know how to impersonate a user and then use integrated security with SQL server? Every place I've looked so far only shows how to use integrated security through IIS. For some reason, everytime I impersonate a user account, SQL server identifies me as "NT AUTHORITY\ANONYMOUS LOGON" Is this by design? or am I doing something wrong?I don't think that the problem you are seeing is due to SQLServer. This is most likely due to your impersonation configuration in IIS. It looks like the impersonation you are doing is not allowed to go out on network (it is like going LogonUser with LOGON32_LOGON_NETWORK flag), that's why when you connect to SQLserver your identity is not the one you expect to be after impersonation. I recommend reading IIS/ASP.Net documentation on that.|||
Thanks for your quick response... but one small detail. I'm not using IIS or asp.net. I'm using the traditional "logonuser" API method. Thanks anyway. And, yes... I'm using the LOGON32_LOGON_NETWORK flag.
|||
Just to conclude: the problem stems from using the LOGON32_LOGON_NETWORK flag, as Ruslan pointed out.
Thanks
Laurentiu
No comments:
Post a Comment