I started an application using Entity Framework Code First. In my Web.config I added the connection string:
<add name="MyContext" connectionString="Data Source=server\mssqlserver2008;Initial Catalog=dbname;persist security info=True; Integrated Security=SSPI" providerName="System.Data.SqlClient" />
And I received a error when I tried to access my Controller: CREATE DATABASE permission denied in database 'master'
So, I debugged the code and I found that the attribute "ConnectionString" inside my Context it's different from my Web.config:
Data Source=.\\SQLEXPRESS;Initial Catalog=MyProject.Models.MyContext;Integrated Security=True;MultipleActiveResultSets=True;Application Name=EntityFrameworkMUE
Why the ConnectionString is wrong??