Bart Schelkens
Bart Schelkens

Reputation: 1293

Database connectionstring windows authentication but passing user and password

I need some help. I'm trying to connect to my database. This is my connectionstring :

<add name="DefaultConnection" connectionString="Data Source=KBV-SQL12-TEST\KBSQLSPTEST; Initial Catalog=KBSPT_aspnetmembership; User Id=KBOVDM01\KBSPT_EXTRANET; Password=SPExtr@n3t" providerName="System.Data.SqlClient" />

The user is an Active Directory user. When I go to my SQLServer and log on as KBSPT_EXTRANET, I can op the SQL Management Studio and connect to the database.

But in my application when I use the connectionstring mentionned above, I keep getting the message "Underlying provider failed on open".

What am I doing wrong?

Upvotes: 0

Views: 80

Answers (1)

ozz
ozz

Reputation: 5366

You are trying to use a Windows account when the connection string is expecting a SQL Server user account.

Upvotes: 1

Related Questions