LINQ to SQL ..Can we have non-integrated windows connection in a connection string
-
Friday, November 16, 2012 7:22 PM
Meaning
can't I use a userid and password in the connection string in the app.config file?
connectionString="Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;”
When I use like this, it is say's login failed for user <user id>.
Any help please?
All Replies
-
Friday, November 16, 2012 8:33 PM
Hi bnathdotnetarchitect;
The User ID and Password that you are using in the connection string is the User ID and Password assigned to the user in the database and is not the Windows ID and password, correct.
If the above did you check the spelling of the two fields to make sure it is correct.
Fernando (MCSD)
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful". -
Friday, November 16, 2012 10:07 PMyes Sir. the userid is on SQL server. Basically integrated windows authentication is false. We are using the security of SQl server. Does LINQ to SQl allow only integrated windows authentication?
-
Saturday, November 17, 2012 1:38 PM
Using SQL Authentication is a general purpose for connecting to database and I have a numerous databases working on LINQ with SQL server authentication
here is how connection string must look like
<add name="DBConnectionString" connectionString="Data Source=SERVERADDRESS;Initial Catalog=DBNAME;Persist Security Info=True;User ID=user;Password=pass" providerName="System.Data.SqlClient" />
make sure that it is so and all 4 parameters:
- Source (SQL Server Name)
- Catalog (Database Name)
- User ID (Database Username)
- Password
Are correct and you'll 100% get access to your database with LINQ
Please mark as reply if helped.
Also visit my blog http://msguy.net/- Marked As Answer by bnathdotnetarchitect Monday, November 19, 2012 5:27 PM
-
Monday, November 19, 2012 5:27 PMThanks a million Michael
-
Monday, November 19, 2012 9:12 PM

