I'm using the new EntityFramework CodeFirst stuff in my project at http://mvcnews.apphb.com.
However, I'm getting a weird error when trying to run after deploying (on my local side I use a standard SQL Server 2010 connection string)
CREATE DATABASE permission denied in database 'master'.
Has anyone had any experience with EntityFramework Code First
and AppHarbor?
I've also tried to connect to the DB using SQL Server Management studio but get a "Cannot open default database for user" error.
Thanks,
Jacob
#1 Posted by friism Support staff on 31 Mar, 2011 01:13 AM
Yeah, I think there's a workaround. EF code first tends to drop and re-create the database which won't work on AppHarbor.
friism closed this discussion on 31 Mar, 2011 01:13 AM.
jacob.gable re-opened this discussion on 31 Mar, 2011 02:50 AM
#2 Posted by jacob.gable on 31 Mar, 2011 02:50 AM
Thanks, that looks like it's getting me closer, but now I'm getting a login failed error
http://mvcnews.apphb.com
Cannot open database "db1634" requested by the login. The login failed.
Login failed for user 'db1634'.
My server is db002
I got the same thing when I tried to log in with Management Studio.
#3 Posted by friism Support staff on 31 Mar, 2011 02:52 AM
Yeah, EF dropped the dB. Can you delete, and create a fresh one?
On 30/03/2011, at 19.50, "jacob.gable"
<[email blocked]>
wrote:
#4 Posted by jacob.gable on 31 Mar, 2011 03:07 AM
Aww yeah... that was it. I had an explicit call to Database.Delete. Now I'm looking good. Thanks for the help.
friism closed this discussion on 31 Mar, 2011 03:15 PM.