我正在尝试将WCF数据服务部署到Arvixe。数据服务基于Entity Framework 5和Data Services 5.4构建。它创建了相当数量的LocalDB数据库(根据运行时输入命名)并在本地运行良好。 web.config中没有连接字符串。 DB名称将传递给DbContext构造函数。但是,当我将项目部署到我的Arvixe(Windows)帐户时,我收到此错误(如下所示)。该错误没有意义,因为没有任何连接字符串。如果它将任何信息写入日志文件,我就无法访问它。它不在我的标准IIS日志中,显示在wwwroot旁边的logs文件夹中。我可以输入一个连接字符串。什么是具有数据库名称“TBD”的localDB连接字符串的示例?
The server encountered an error processing the request. The exception message is 'An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.'. See server logs for more details. The exception stack trace is:
at System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) at System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() at lambda_method(Closure , Object ) at System.Data.Services.Providers.DbContextHelper.GetObjectContext(Object o) at System.Data.Services.Caching.MetadataCache`1.TryLookup(Type serviceType, Object dataContextInstance) at System.Data.Services.Providers.BaseServiceProvider.LoadMetadata() at System.Data.Services.DataService`1.CreateMetadataAndQueryProviders(IDataServiceMetadataProvider& metadataProviderInstance, IDataServiceQueryProvider& queryProviderInstance, BaseServiceProvider& builtInProvider, Object& dataSourceInstance) 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)
答案 0 :(得分:1)
这些连接字符串应该适用于帐户:
您只需根据需要更改信息。
如果您有任何问题,请与我们联系。
谢谢!
答案 1 :(得分:0)
LocalDB在哪里?请注意,由于我们的最新服务器不运行SQL Server Express,您只需使用localhost或server.arvixe.com,其中server是您所在服务器的名称。
最后,即使您可能没有使用连接字符串,但是您指定在代码中进行连接的方式也被视为“连接字符串”。所以,它没有必要
答案 2 :(得分:0)
在与Arvixe进行了两周的电子邮件旅行后,他们告诉我无法在我的共享服务器上安装LocalDb;我需要他们的VPS帐户。那真不幸。告诉我它最初安装的人被误导了。