E
Eigh
Hi.
I'm trying to establish a connection to an SQL 2005 server using different
credentials than the ones currently in use. The server only allows Windows
Authentication, so I have to impersonate a different user. Setting
impersonation on the web.config isn't an option. Moreover, the Sql server
is on a different domain than the code that I am running the webapp on.
I've confirmed with absolute certainty that the credentials that I am using
to try to login remotely DO have access to login to the remote sql server by
logging in using "runas /netonly /user:domain\user sqlwb"
In code, I've tried impersonating a different user using
WindowsIdentity.Impersonate, but I get error 1326 when executing
LoginUser(lpszUsername, lpszDomain, lpszPassword, dwLoginType,
dwLoginprovider, phToken).
I assume the error comes from trying to authenticate credentials that my
workstation doesn't have access to. How else can I authenticate a user
account across the network using credentials on a domain that my machine is
not logged into?
Any help would be appreciated.
thanks,
Eigh
I'm trying to establish a connection to an SQL 2005 server using different
credentials than the ones currently in use. The server only allows Windows
Authentication, so I have to impersonate a different user. Setting
impersonation on the web.config isn't an option. Moreover, the Sql server
is on a different domain than the code that I am running the webapp on.
I've confirmed with absolute certainty that the credentials that I am using
to try to login remotely DO have access to login to the remote sql server by
logging in using "runas /netonly /user:domain\user sqlwb"
In code, I've tried impersonating a different user using
WindowsIdentity.Impersonate, but I get error 1326 when executing
LoginUser(lpszUsername, lpszDomain, lpszPassword, dwLoginType,
dwLoginprovider, phToken).
I assume the error comes from trying to authenticate credentials that my
workstation doesn't have access to. How else can I authenticate a user
account across the network using credentials on a domain that my machine is
not logged into?
Any help would be appreciated.
thanks,
Eigh