My entity framework application is not working, every time I start the application I receive :
" The underlying provider failed on Open" excpetion. the inner exception is "server is unreachable"...
I'm using a local sql server and the ConnectionString
is correct.(Already tested it in a small console application)
The connection string looks like this:
<add name="Programmeren5Entities" connectionString="metadata=res://*/NinjaDataModel.csdl|res://*/NinjaDataModel.ssdl|res://*/NinjaDataModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\DEVELOPMENT;initial catalog=Programmeren5;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
Here is the part that throws the exception:
var b = new List<Ninja>();
using (var context = new Programmeren5Entities())
{
b = context.Ninja.ToList();
}
return b;
What could be the reason it doesn't work? The database also has the right format and does have all the columns. I also tried the DTC config solution and checked if the SQL service was running.