0

I've been trying for the last few nights to upload an MVC solution to either Azure or a VM with IIS 7.5 that uses Pirahna CMS.

This uploads fine without DevExpress but when I reference DevExpress I get an exception (see below).

I know that Piranha CMS uses MEF and I wonder if DevExpress also does and they clash (big assumption).

Exception:

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

I have tried

-Debugging and followed a guide to retrieving the LoadExceptions but they were null.

-Making sure my referenced projects have build 'any cpu'

I have setup IIS locally using the same drop folder and I got a different exception where I had to enable write permissions to app_data/logs, in doing this the site worked locally. I tried doing this on my IIS VM doing this had no effect.

Can anyone offer some advice on this error please?

Thanks in advance.

David Hawkins
  • 1,049
  • 1
  • 10
  • 30
  • I have not tried using Piranha CMS together with DevExpress, so I haven't seen the error before. However, when you activated write access for ~/App_Data/Logs/ did you get any error messages in the log file that is written to this directory? Apart from that there shouldn't be any hiccups with Azure as the piranhacms.org site is running on Azure WebSites. – Håkan Edling Feb 18 '14 at 21:45
  • Did you ever solve your issue? The stack trace you posted usually means that some dependency is not found. Maybe you have some DLL's installed in your GAC on your development that isn't present on the deployment machine. Have you tried to "publish with dependencies"? – Håkan Edling Mar 12 '14 at 20:18
  • I never got to the bottom of it. Yes I tried a publish with dependencies that's generally how I deploy. In the end I decided to drop DevExpress. I put it down to both 3rd party software packages needing to use URL Re-writing and causing a clash. – David Hawkins Mar 13 '14 at 12:18

0 Answers0