将LocalDB应用程序部署到Arvixe失败

本文关键字:Arvixe 失败 部署 LocalDB 应用程序 | 更新日期: 2023-09-27 18:09:15

我正在尝试部署一个WCF数据服务到Arvixe。数据服务建立在实体框架5和数据服务5.4之上。它创建了相当数量的LocalDB数据库(根据运行时输入命名),并在本地运行良好。在web.config中没有连接字符串。数据库名称被传递给DbContext构造函数。然而,当我将我的项目部署到我的Arvixe (Windows)帐户时,我得到了这个错误(如下)。这个错误没有意义,因为没有任何连接字符串。如果它向日志文件写入任何信息,我也无法访问它。它不在我的标准IIS日志中,显示在wwwroot旁边的logs文件夹中。我可以输入一个连接字符串。localDB连接字符串以"TBD"作为数据库名称的示例是什么?

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)

将LocalDB应用程序部署到Arvixe失败

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

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-database

你只需要根据你的需要改变信息。

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

谢谢!

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

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

在与Arvixe进行了两周的邮件访问后,他们通知我无法在我的共享服务器上安装LocalDb;我需要他们的VPS账户。这是不幸的。告诉我最初安装的人是被误导了。