I install SQL Server 2005 EXPRESS edition on one computer, Computer Name = 'MyServe' and Database name='MyDB',take it as database server. it is configured as both Database and Windows Authentication Mode. with username=sa and password=adminaa. I have application in C#.Net my connection string is ConnectionString = "Data Source=MyServe\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=True;User ID=sa;Password=adminaa";

when I run the application on the computer called MyServe, the database server, it works well, while when I install the application on different computer, when it tries to connect the database it gives an error called "login failed for user 'MyServe\Guest" what is wrong with configuration in the database server or other mistakes. please help me. thankyou in advance.



If you want to use SQL authentication, remove the 'Integrated Security=true' from your connection string. This will trump the values in the UserId and Password fields, forcing integrated windows authentication to occur.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.