ASP.NET / MVC4 Connection String to SQL Server 2008 error -
i working through asp.net mvc4 tutorial asp.net. second tutorial in getting database connection errors. here error:
an error occurred while getting provider information database. can caused entity >framework using incorrect connection string. check inner exceptions details , ensure >the connection string correct.
here connection strings. first 1 generated template, 2nd copied verbatim tutorial. running sql server 2008, not express. may problem. database created automatically application well. not have login / password aware of local db.
<add name="defaultconnection" connectionstring="data source=.\sqlexpress;initial catalog=aspnet-mvcmovie-20130830102032;integrated security=sspi" providername="system.data.sqlclient" /> <add name="moviedbcontext" connectionstring="data source=(localdb)\v11.0;attachdbfilename=|datadirectory|\movies.mdf;integrated security=true" providername="system.data.sqlclient"/>
i've looked on connectionstrings.com & asp.net find resolution , not clear on fix. error has in connection string, unsure one, if not both, is.
thanks
i changed data source data source=. , here error now:
there object named 'pk_dbo.movies' in database. not create constraint. see previous errors.
i tried delete database in sql server , unable when right clicking on , pressing delete. ideas?
Comments
Post a Comment