Database creation
Trying to use EFCodeFirst in a deployment to AppHarbor, and I'm getting 'The provider did not return a ProviderManifestToken string.' as an error when I try and hit the site. the deployment worked fine, but the first time I try and hit a resource, I assume is when EF tries to actually deploy the DB. I have checked locally, and the connection string is right it's pointing at the AppHarbor DB that your system made for me, and from the stack trace it looks like it's failing when trying to build the db tables. How should I proceed?
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by friism on 08 Mar, 2011 06:38 PM
If I'm not mistaken, several others users have encountered this problem with Entity Framework. There's a workaround. Entity Framework may have dropped your database, in that case you need to delete the current one from AppHarbor and recreate it.
Let me know if this doesn't solve your problem.
friism closed this discussion on 08 Mar, 2011 06:38 PM.
Vencill, Paul A. re-opened this discussion on 08 Mar, 2011 10:05 PM
2 Posted by Vencill, Paul A... on 08 Mar, 2011 10:05 PM
Thanks, that is a good article, but I'm still getting the exact same error. Complete stack trace:
Server stack trace: at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) at System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) at System.Data.Entity.ModelConfiguration.ModelBuilder.Build(DbConnection providerConnection) at System.Data.Entity.Internal.LazyInternalContext.CreateModel() at System.Lazy`1.CreateValue() Exception rethrown at [0]: at System.Lazy`1.get_Value() at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.Initialize() at System.Data.Entity.Internal.LazyInternalContext.get_ObjectContext() at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() at MyApp.Api.ChildCollection.CreateDataSource() in d:\temp\n2safkwn.rwl\input\MyApp.Api\Service.svc.cs:line 44 at System.Data.Services.DataService`1.CreateDataSourceInstance() at System.Data.Services.DataService`1.CreateProvider() at System.Data.Services.DataService`1.HandleRequest() at System.Data.Services.DataService`1.ProcessRequestForMessage(Stream messageBody) at SyncInvokeProcessRequestForMessage(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
Support Staff 3 Posted by friism on 09 Mar, 2011 12:28 AM
According to this post, there may be something wrong with your connectionstring. Could you post the connectionstring you're using?
I'm making this conversation private, so that people cannot see your password etc.
4 Posted by Vencill, Paul A... on 09 Mar, 2011 02:10 AM
well, I guess I misread the docs. The first time I read them, I thought it had said that your deployment scripts would either add or replace my connection string for me if they had matching names, but the article I found this time (it's a different article; the first was db-only, this one is overall deployment) says that it only replaces. So adding in the named connection string fixed the issue. Thanks.
________________________________________
From: Michael Friis [[email blocked]]
Sent: Tuesday, March 08, 2011 7:28 PM
To: Vencill, Paul A.
Subject: Re: Database creation [Support]
Support Staff 5 Posted by friism on 09 Mar, 2011 02:50 AM
Cool, glad you got it working.
friism closed this discussion on 09 Mar, 2011 02:50 AM.