Custom DB access from sharepoint webpart
Hi
We have an issue in accessing custom DB from sharepoint custom webpart. When
we try to access the custom DB from sharepoint webpart we are getting the error "Login Failed for User NTAuthority\Anonymous Logon".
This issue occurs in the following scenario:
WebApplication exists
in seperate server
DB Server Instance
exists in seperate server and
WebApplication AppPool
uses "domain\someuser"
and DB
Server Instance has the same user "domain\someuser" and has permission to Custom DB.
Web.config entries:
<authentication
mode="Windows"
/>
<identity
impersonate="true"
/>
The connection string we are using is "Data Source=xxxx;
Initial catalog=yyy; Integrated security=true;"
We have tried with a small change in conneciontion string as well "Data Source=xxxx; Initial catalog=yyy; Integrated security=SSPI;" It didn't work.
It works in 3 scenario’s, but these are not acceptable as per our client security rules,
1.
If we modify impersonation to use the domain user
<identity
impersonate="true"
username=”domain\someuser” password=”***” />
2.
If we add “NTAuthority\Anonymous Logon” as a user in custom DB server
instance.
3.
If we use Sql Authentication “Data Source=xxxx; Initial catalog=yyy; Integrated security=false;user id=sampleuser;password=***;”
Is there any other approach which could be used to resolve this issue.
Thanks & Regards
MuthuMuthu
May 13th, 2010 11:34am