Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

Hi,



I am trying to connect to a database server that my domain login name does not have access too.



But in my connection string i am including a username and password that does have access but when i run my code, it throws an exception saying that my domain login and password does not have access. I am not using my domain login and password in my connection string.



my connection string>

connectionString="Data Source=server;User ID=allowedID;password=validPassword;Initial Catalog=database;Integrated Security=True;Trusted_Connection=True;"



Please help

Posted
Updated 8-Aug-17 0:19am
v2

1 solution

I think you'll find that when you specify Integrated Security=true in a connection string, it totally ignores the  UserID and Password. Take out the Integrated Security bit and I think it'll work how you expect.

 
Share this answer
 

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