Monday, March 26, 2012

Login failed for user '(null)'. Reason: Not associated with a trusted SQL server....

Hi guys,

I have a problem:

I have a created a vb.net app.

From this vb.net App (in server A) I connect to the SQL server SP4 (in serverA) and to a SQLServer 2000 SP4 in another server (server B).
All connection are with trusted_connection = true. Server A and B are in a domain.

After pressed a button, (when I run the button I am logged as a domain administrator) some store procedures and table are created in SQL server A and B.

During this phase everything is OK, I mean tables and store procs are installed correctly, and Linked server are installed.

The problem is that:at the end of this job a store aprocedure (in server B) is called form which has a sql statement (SQL select ...inner join from table in different sql server A,B),
the vb.net app show an error:

"System.Data.SQLClient.SqlExcemption: Login failed for user '(null)'. Reason: Not associated with a trusted SQL server connection"

Linked server is:

Local Login: domain\administrator
Impersonate: true
RMUser and Pw are null
Selected: Be made using the login's current security context

SQL server is win + SQL auth mode.

and account: System Account

Do you know how to solve the problem.

I tried to modify option in Linked server but is the same.

I replaced the conn string in vb.net with user and pass and everything work.
So, it looks like that using windows account credential used are lost.

Any help will be very appreciated

For .NET related questions, please see the Data Access forum in the .NET group.

No comments:

Post a Comment