Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
vemulavijay
Starting Member
32 Posts |
Posted - 2004-12-02 : 20:31:42
|
| I have developed a .NET windows application, which is supposed to connect to SQL server 2000 on another system.If SQL server 2000 exists in XP system, all queries from my system are getting executed well. But when the SQL server 2000 exists in Win 2K system, it throws an error saying that: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.My SQL server is in Mixed Authentication Mode(SQL Server and Windows). And this problem exists even if both the systems are in same domain or different.Can anybody throw some light on it Please. Thank you very much.Regards,Vijay |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-12-02 : 20:36:38
|
| You can get this error if you do not explicitly specify an Integrated Security entry in the connection string, or if you don't specify a User ID and Password. |
 |
|
|
vemulavijay
Starting Member
32 Posts |
Posted - 2004-12-02 : 20:50:54
|
| thanks robvolk,my connection string is as follows:connection = new System.Data.SqlClient.SqlConnection(); connection.ConnectionString = "integrated security=SSPI;data source=myserver; persist security info =False;Trusted_Connection= yes;initial catalog=mydb; User id = myName; Password =mypwd;But Still it does not work. Please identify the problem. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-12-02 : 21:22:44
|
| You cannot specify both Integrated security AND a user id and password. Take the user id and password out and see if that works. |
 |
|
|
vemulavijay
Starting Member
32 Posts |
Posted - 2004-12-02 : 22:10:24
|
| hi robvolk,i removed used id and password. but still it does not work. let me give a better picture. i have 3 systems(A,B,C) with sql server 2000 installed( all 3 are servers). A,B systems have windows 2000 professional operating system and C systm has XP professional. The application which i have developed works fine if i try to connect to sql server in win2000(B) from XP(C). but the same application if i install it in system A and try to access sql server in system B ,it is giving the above mentioned error.how it can give error as the exe is same. do i have to take care of some security issues in win2000?regards,vijay. |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-12-03 : 02:35:15
|
try thisquote: connection = new System.Data.SqlClient.SqlConnection(); connection.ConnectionString = "provider=sqloledb;data source=myserver;initial catalog=mydb; User id = myName; Password =mypwd;
--------------------keeping it simple... |
 |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2004-12-03 : 14:14:46
|
| Also make sure you are not allowing Anonymous logins in IIS.-Chadhttp://www.clrsoft.comSoftware built for the Common Language Runtime. |
 |
|
|
|
|
|
|
|