Reputation: 79
While I was following this tutorial: https://www.youtube.com/watch?v=BfEjDD8mWYg&t=1809s I ran into a problem around 29:25. When I type the update-database in the package manager console it says what is seen in the first screensht, and some more. When its done it shows the text in the second screenshot.
I have looked in multiple stackoverflow questions and answers, also looked on other sites. Some said it had to do with a problem in ssms 17 so I downloaded 18 but it still happens. The main problem is sen in the second screenshot "Toegang geweigerd" this is dutch for "Access denied". So basically the program isnt getting access to create a file.
If anyone knows how to give it premission or how to make it work please tell me!
Upvotes: 0
Views: 258
Reputation: 5139
Operating System Error 5 is 'permission denied', I think. If the back-end is SqlServe r (you need to tag it), it is attempting to create a database using data and log files under the folders specified during Sql Server installation, and the service account under which it was configured to run does not have create file access to those folders. You need to specify your environment: is this a remote server? is there database administrator responsible for the server, or is it your own local installation? Normally you create the database yourself outside EntityFramework (or a DBA creates it for you), that way you would have lots more control on the location/size of the database to be created.
Upvotes: 1