Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a c# project. In my connection string i'm passing userid=sa and password=sa123.The problem is that when i try to run the app in any other machine, it throws an error message.The message is : User cannot log in .
When i add that user in my sql server, there is no error and my app opens in the other pc.
So how can i give permission to all users that uses my application?
Or else can i change the connection string so that any user can run the app??
Posted
Updated 10-Mar-12 2:39am
v3

1 solution

This problem occurs when one of the following scenarios is true:
•The Allow only anonymous connections security setting has been turned on in the Microsoft Management Console (MMC).
•The username does not have the Log on locally permission in User Manager.
•The username does not have the Access this computer from the network permission in User Manager.
•The Domain Name was not specified together with the username

You need to take care of the above list to resolve this issue.
 
Share this answer
 
Comments
lilian87 10-Mar-12 8:58am    
We are in same domain and he is the admin ie he has all the permissions to access all pc.
So there is nothing to do with the connection string??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900