0

我正在尝试将 WCF 数据服务部署到 Arvixe。数据服务基于 Entity Framework 5 和 Data Services 5.4 构建。它创建了相当数量的 LocalDB 数据库(根据运行时输入命名)并在本地运行良好。web.config 中没有连接字符串。DB 名称被传递给 DbContext 构造函数。但是,当我将项目部署到我的 Arvixe (Windows) 帐户时,我收到此错误(如下)。该错误没有意义,因为没有任何连接字符串。如果它将任何信息写入日志文件,我将无权访问它。它不在我的标准 IIS 日志中,它显示在 wwwroot 旁边的日志文件夹中。我可以输入一个连接字符串。什么是具有数据库名称“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)
4

3 回答 3

1

这些连接字符串应该适用于该帐户:

https://support.arvixe.com/index.php?/Knowledgebase/Article/View/51/8/do-you-have-a-connection-string-i-can-use-to-connect-to-the -local-mssql-数据库

您只需要根据需要更改信息。

如果您有任何问题,请告诉我。

谢谢!

于 2013-04-17T13:44:28.163 回答
0

LocalDB 位于哪里?请注意,由于我们最新的服务器不运行 SQL Server Express,您可以简单地使用 localhost 或 server.arvixe.com,其中 server 是您所在服务器的名称。

最后,即使您可能没有使用连接字符串,但是您在代码中指定的连接方式被视为“连接字符串”。所以,不需要

于 2013-04-17T16:19:12.180 回答
0

在与 Arvixe 进行了两周的电子邮件旅行后,他们告诉我无法在我的共享服务器上安装 LocalDb;我需要他们的 VPS 帐户。那真不幸。告诉我它最初安装的人被误导了。

于 2013-04-27T03:36:15.913 回答