Developer forum

Forum » Development » Application Insights

Application Insights

Martijn van Tongeren
Reply

Hi,

I want to improve the performance off our shop. I install Microsoft Application Insight everything worked ok but when i access a page with a index (var queryProvider = ServiceLocator.Current.GetInstance<IIndexService>().LoadIndex(query.Source.Repository, query.Source.Item).GetInstance() as IQueryProvider;) I get the following error:

 

ynamicweb.Extensibility.ActivationException: IIndexService -
LoaderExceptions information:
Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
at System.Linq.Enumerable.d__16`2.MoveNext()
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore[T](String contractName)
at Dynamicweb.Extensibility.MefServiceLocator.DoGetInstance(Type serviceType, String key)
at Dynamicweb.Extensibility.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
--- End of inner exception stack trace ---
at Dynamicweb.Extensibility.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at Dynamicweb.Extensibility.ServiceLocatorImplBase.GetInstance[TService]()
at Jaarbeurs.Shop.Dal.LuceneRepositories.ProductRepository.GetIndexGroupResult(PageView pageView, String groupId) in C:\VSOnline\Jaarbeurs\Jaarbeurs.Shop\Jaarbeurs.Shop.Dal\LuceneRepositories\ProductRepository.cs:line 140
at Jaarbeurs.Shop.Dal.LuceneRepositories.ProductRepository.GetProductPriceCollection(PageView pageView, String groupId) in C:\VSOnline\Jaarbeurs\Jaarbeurs.Shop\Jaarbeurs.Shop.Dal\LuceneRepositories\ProductRepository.cs:line 77
at Jaarbeurs.Shop.Web.Dynamicweb.Extenders.ProductListTemplateExtender.HandleMinMaxPrice(Template template) in C:\VSOnline\Jaarbeurs\Jaarbeurs.Shop\Jaarbeurs.Shop.Web\Dynamicweb\Extenders\ProductListTemplateExtender.cs:line 38
at Jaarbeurs.Shop.Web.Dynamicweb.Extenders.ProductListTemplateExtender.ExtendTemplate(Template template) in C:\VSOnline\Jaarbeurs\Jaarbeurs.Shop\Jaarbeurs.Shop.Web\Dynamicweb\Extenders\ProductListTemplateExtender.cs:line 21
at Dynamicweb.eCommerce.Frontend.Renderer.RenderProductListTemplateExtenders(ProductCollection ProductList, Template Template)
at Dynamicweb.eCommerce.Frontend.Renderer.RenderProducts(ProductCollection Products, Template ParentTemplate, String LoopName, Int32 LoopCounter, Boolean renderRelatedProducts, Boolean renderRelatedLists)
at Dynamicweb.eCommerce.Frontend.Renderer.RenderRelatedProductLists(Template template, RelatedProductListProviderEventArgs relatedParams)
at Dynamicweb.eCommerce.Frontend.Renderer.RenderProducts(ProductCollection Products, Template ParentTemplate, String LoopName, Int32 LoopCounter, Boolean renderRelatedProducts, Boolean renderRelatedLists)
at Dynamicweb.eCommerce.Frontend.Renderer.RenderProducts(ProductCollection Products, Template ParentTemplate)
at Dynamicweb.eCommerce.Frontend.Renderer.internalRenderProducts(ProductCollection products, Boolean isProductsFromIndex)
at Dynamicweb.eCommerce.Frontend.Frontend.ListProducts(ProductCollection products, String groupsIdent, Boolean hasBeenSorted)
at Dynamicweb.eCommerce.Frontend.Frontend.List(String groups)
at Dynamicweb.eCommerce.Frontend.Frontend.EcomRender()
at Dynamicweb.eCommerce.Frontend.Frontend.GetContent()
at Dynamicweb.Frontend.Content.GetModule(DataRow& ParagraphRow)

Do you have any suggetions?


Replies

 
Mikkel Høst
Reply

Hi Martjin.

This is because DW depends on the DLL it self and the one you have installed is another version. you have 2 options. Use the one DW is depending on or "forward" the dependency to the version you have installed. 

Like i do here with NLOG. This means that every dependency on NLOG 0-2 will point to the 3.1 version i have installed.

<dependentAssembly>
        <assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="3.1.0.0"/>
      </dependentAssembly>

 

You must be logged in to post in the forum