So I was trying to play with MVC 4 along with entity framework(EF) and just when I was getting started and I got this error.
The error itself is pretty explanatory. It's saying, that the visual studio is unable to create the database on my behalf with the default credentials with which I am logged in. I am guessing it wasn't even able to create the database and hence using 'master' database?? I don't know... I don't know if my local sql express is corrupted or what..
Anyway, I resolved it in following way:
- Created a database in SQL Server 2008.
- Add a user to that database and make sure to give the necessary permissions. I just gave all possible permission since I am just playing but you probably don’t want to do that unless you are playing with your local copy.
- Now use that database in connection string in the web.config of the project. Please make sure to add the connection string to the web.config of the project not the one under Views.
- Looks as follows:
- Also make sure to use the same name while creating the context class.
Hope it helped!
I got this error when I was playing with MVC using entity framework. Got this error when I refactor (rename) one of the class property.The simple resolution was this: … more
So I was trying to play with MVC 4 along with entity framework(EF) and just when I was getting started and I got this error. The error itself is pretty explanatory. It's saying, … more
REST api were supported in SharePoint 2010 as well … more
You must have heard that SharePoint now has this really cool thing called apps. You might also heard that now it supports ton of RESTful operations, almost everything that CSOM might offer. If you … more