I kept getting this error:
Directory lookup for the file "c:\users\fincherm\documents\visual studio 2015\Projects\
Mvc5Demo\Mvc5Demo\App_Data\Jokes2.mdf"
failed with the operating system error 5(Access is denied.).
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
It turns out the problem was the identity of the SQLExpress service, "NT Service\MSSQL$SQLExpress" did not have write permissions in the file system to create a database. Adding "write" permission to that identity fixed the problem and now my MVC app works with SQL Server.
No comments:
Post a Comment