繁体   English   中英

Windows Server 2012(Azure)上的Umbraco 7.1.9

[英]Umbraco 7.1.9 on Windows Server 2012 (Azure)

我们最近在Azure托管的Windows Server 2012 VM上部署了Umbraco 7.1.9应用程序。 该应用程序在我们的开发人员计算机上本地工作#1,但是当我们在VM上部署网站时,出现此错误:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Reflection.ReflectionTypeLoadException: Could not load types from assembly umbraco, Version=1.0.5443.21812, Culture=neutral, PublicKeyToken=null, errors:
Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.Editors.ContentPostValidateAttribute'.  Assembly: 'umbraco, Version=1.0.5443.21812, Culture=neutral, PublicKeyToken=null'.
Exception: System.TypeLoadException: Could not load type 'System.Web.Http.Controllers.IControllerConfiguration' from assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Exception: System.TypeLoadException: Could not load type 'System.Web.Http.Controllers.IControllerConfiguration' from assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Exception: System.TypeLoadException: Could not load type 'System.Web.Http.Controllers.IControllerConfiguration' from assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.EnsureUserPermissionForContentAttribute'.  Assembly: 'umbraco, Version=1.0.5443.21812, Culture=neutral, PublicKeyToken=null'.
Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.EnsureUserPermissionForMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5443.21812, Culture=neutral, PublicKeyToken=null'.
Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute'.  Assembly: 'umbraco, Version=1.0.5443.21812, Culture=neutral, PublicKeyToken=null'.
Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5443.21812, Culture=neutral, PublicKeyToken=null'.
Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5443.21812, Culture=neutral, PublicKeyToken=null'.
Exception: System.TypeLoadException: Could not load type 'System.Web.Http.Controllers.IControllerConfiguration' from assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Exception: System.TypeLoadException: Could not load type 'System.Web.Http.Dispatcher.DefaultHttpControllerSelector' from assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

我们安装了最新版本的.NET Framework,并在服务器上进行了每次更新,但我们无法使其正常工作。

任何人都有类似的问题吗?

编辑 :有用的线程在这里...

http://our.umbraco.org/forum/getting-started/installing-umbraco/48351-Umbraco-703-is-totally-broken-after-fresh-nuget-install

这没有帮助...

我还没有看到这个问题,但今天我正在将Web.config从7.1.4升级到7.1.9,我注意到有两件事可能会对您有所帮助。

  1. 这是最近添加的:

     <add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
  2. Web.config中没有针对System.Web.Http的内容:

     <dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/> </dependentAssembly> 

让我想知道您问题的答案是否可能要添加以下内容:

<dependentAssembly>
    <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>

或者这个( 在这里看到 ):

<dependentAssembly>
    <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
</dependentAssembly>

不确定是否对其他遇到此问题的人有所帮助,因为它对我们的项目非常特定。

我们添加了LowercaseRoutesMVC4包取决于AspNetWebApi.Core这是不公开的包。 它引用了System.Web.Http的错误版本。 我卸载了此程序包,在路由配置中使用了LowercaseUrls属性,而不是NuGet程序包,现在一切正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM