sql - CREATE DATABASE permission denied in database 'master'. MVC EF 4.1 Codefirst getting started -


i checked here , internet no answer. how work ? using discountasp.net sql setting on thier side make work ?

the following blog post explains well. if haven't specified connection string in web.config ef codefirst attempt create db on local instance of sqlexpress. otherwise can set intent assigning named connnection string via public constructor of entities context inheriting base constructor.

http://blogs.msdn.com/b/adonet/archive/2011/01/27/using-dbcontext-in-ef-feature-ctp5-part-2-connections-and-models.aspx

    public class unicornscontext : dbcontext     {         public unicornscontext()            : base("unicornscedatabase")         {         }     } 

either way you'll need ensure account has appropriate access sql(express) server create new database.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -