0

在过去的几个晚上,我一直在尝试将 MVC 解决方案上传到 Azure 或使用 Pirahna CMS 的带有 IIS 7.5 的 VM。

没有 DevExpress 可以正常上传,但是当我引用 DevExpress 时出现异常(见下文)。

我知道 Piranha CMS 使用 MEF,我想知道 DevExpress 是否也这样做并且它们发生冲突(大假设)。

例外:

Server Error in '/' Application.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

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: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +9
   System.Reflection.Assembly.GetTypes() +143
   System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog() +241
   System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition) +13
   System.Linq.<SelectManyIterator>d__14`2.MoveNext() +267
   System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +477
   System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) +48
   System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +136
   System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) +54
   System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +404
   System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports) +54
   System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition) +230
   System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) +78
   System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition) +106
   System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComposition) +200
   System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part) +444
   System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports) +279
   System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(ComposablePart part) +221
   System.ComponentModel.Composition.Hosting.CompositionServices.TryInvoke(Action action) +58
   System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch) +969
   Piranha.Application..ctor() +374
   Piranha.Application..cctor() +28

[TypeInitializationException: The type initializer for 'Piranha.Application' threw an exception.]
   Piranha.WebPages.WebPiranha.BeginRequest(HttpContext context) +1927
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440

我努力了

- 调试并遵循检索 LoadExceptions 的指南,但它们为空。

- 确保我引用的项目已构建“任何 cpu”

我已经使用相同的放置文件夹在本地设置了 IIS,但我遇到了一个不同的异常,我必须启用对 app_data/logs 的写入权限,这样做时站点在本地工作。我尝试在我的 IIS VM 上执行此操作,但没有效果。

任何人都可以就这个错误提供一些建议吗?

提前致谢。

4

0 回答 0