Entity framework - login failed for user 'test'

I am trying to develop an MVC app on my local computer and I have huge troubles opening a connection to my database.

At the same time, I am able to run SQL scripts and they work just fine.

Whenever a line like this is hit:

AsTuLusEntities entity = new AsTuLusEntities();

I get the following error:

Login failed for user 'test'.

I have installed Microsoft SQL Server Management Studio, SQL Server Configuration Manager, but I don't know what's not working and what is wrong.

In SQL Server Management Studio, I have created a user named 'test', server roles sysadmin, securables set on my server with Connect to SQL granted. The server is installed on my local machine.

What do I need to do to make this work with Visual Studio?

Here are my connection strings:

<add name="AstulusEntities_ADO" connectionString="data source=\SQLEXPRESS;initial catalog=AsTuLus;user id=test;password=***;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
<add name="AsTuLusEntities" connectionString="metadata=res://*/Models.Database.AsTuLusEntity.csdl|res://*/Models.Database.AsTuLusEntity.ssdl|res://*/Models.Database.AsTuLusEntity.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=\SQLEXPRESS;initial catalog=AsTuLus;persist security info=True;user id=test;password=***;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

0 answers