Hi,
I can connect to the SQL server installed in another machine in our network. But when I run the web form I'm having this error.
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Pls help me
your sql server to need to setup account for this paticular machine to access.|||Hi lakmalvbj,
From your description, I understand you can use SQL client tool to connect the remote SQL Server by window authentication, but Web Form fail. If I have misunderstood your concern, please feel free to let me know.
The error message isLogin failed for user ''. The user is not associated with a trusted SQL Server connection.
I find the user name is null. Is it the intact error message?
If the error message is intact. For the user who login fail is null, I believe you were using Impersonation in web.config with simply section:
<identityimpersonate="true" />
When a client view the page with Windows Authentication, the primary token can be passed only once and cannot be used for connecting remove database. So the null user login fail error occured. this is a design feature of NTLM security. And the solution is set username and password in identity section.
<identityimpersonate ="true"username="Domain\UserName"password="pword"/>
Or change the connect string to use SQL authentication.
Hi,
Thanks for all replies.
I solved the problem by creating new user in sql server and giving l user name and password in Connection String. Work fine.
Dim myconnection As SqlConnection = New SqlConnection("workstation id="Ur Work Station";packet size=4096;user id=XXXX;password=XXXX;data source=Server;initial catalog=Database")
This work fine. I tried Benson Yu's suggestions. It also work fine
No comments:
Post a Comment