簡體   English   中英

Azure Umbraco Web矩陣發布錯誤

[英]Azure Umbraco Web Matrix Publish Error

我在通過webmatrix將Umbraco安裝到Azure時遇到問題。

這是錯誤:

> Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

> WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

我在網上找不到任何可幫助解決此問題的信息。 這是一個非常基本的Umbraco安裝,僅包含一個插件:嵌套內容。

這是完整堆棧跟蹤:

> [FileLoadException: Could not load file or assembly
> 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral,
> PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The
> located assembly's manifest definition does not match the assembly
> reference. (Exception from HRESULT: 0x80131040)]   
> System.RuntimeTypeHandle.GetTypeByName(String name, Boolean
> throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
> StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean
> loadTypeFromPartialName, ObjectHandleOnStack type) +0   
> System.RuntimeTypeHandle.GetTypeByName(String name, Boolean
> throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
> StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean
> loadTypeFromPartialName) +70    System.RuntimeType.GetType(String
> typeName, Boolean throwOnError, Boolean ignoreCase, Boolean
> reflectionOnly, StackCrawlMark& stackMark) +40   
> System.Type.GetType(String typeName) +30   
> System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
> +108    System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +88   
> Umbraco.Core.Persistence.Database.CommonConstruct() +35   
> Umbraco.Core.Persistence.Database..ctor(String connectionString,
> String providerName) +119   
> Umbraco.Core.DatabaseContext.ValidateDatabaseSchema() +211   
> Umbraco.Core.ApplicationContext.get_IsUpgrading() +68   
> Umbraco.Web.Security.Identity.AppBuilderExtensions.UseUmbracoBackOfficeCookieAuthentication(IAppBuilder
> app, CookieAuthenticationOptions options, ApplicationContext
> appContext, PipelineStage stage) +96   
> Umbraco.Web.Security.Identity.AppBuilderExtensions.UseUmbracoBackOfficeCookieAuthentication(IAppBuilder
> app, ApplicationContext appContext, PipelineStage stage) +314   
> Umbraco.Web.UmbracoDefaultOwinStartup.ConfigureMiddleware(IAppBuilder
> app) +30   
> Umbraco.Web.UmbracoDefaultOwinStartup.Configuration(IAppBuilder app)
> +44
> 
> [TargetInvocationException: Exception has been thrown by the target of
> an invocation.]    System.RuntimeMethodHandle.InvokeMethod(Object
> target, Object[] arguments, Signature sig, Boolean constructor) +0   
> System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
> Object[] parameters, Object[] arguments) +160   
> System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
> +101    Owin.Loader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder) +66   
> Owin.Loader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder
> builder) +123   
> Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass2.<InitializeBlueprint>b__0(IAppBuilder
> builder) +71   
> Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1
> startup) +462   
> Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40 
> Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
> System.Threading.LazyInitializer.EnsureInitializedCore(T& target,
> Boolean& initialized, Object& syncLock, Func`1 valueFactory) +115   
> Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication
> context) +106   
> System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
> appContext, HttpContext context, MethodInfo[] handlers) +536   
> System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
> MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172   
> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
> appContext, HttpContext context) +336   
> System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
> appContext) +296
> 
> [HttpException (0x80004005): Exception has been thrown by the target
> of an invocation.]   
> System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9963380 
> System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
> +101    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
> wr, HttpContext context) +254

錯誤消息表明System.Data.SqlServerCe.dll未正確加載。 根據我的經驗,可能是System.Data.SqlServerCe.dll文件不在bin文件夾中,或者是在web.config文件中未正確配置。 我們可以在本地檢查項目中的文件,並使用kudu工具在Azure門戶中檢查文件。 有關更多詳細信息,請參閱屏幕快照。我還找到了一些有關如何使用Microsoft WebMatrix安裝Umbraco的材料。

在此處輸入圖片說明

在此處輸入圖片說明

如果Web.config中沒有此設置,請將其添加到Web.config文件中。

<system.data>
    <DbProviderFactories>
        <add invariant="System.Data.SqlServerCe.4.0" name="Microsoft® SQL Server® Compact 4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </DbProviderFactories>
</system.data>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM