Hi Marija!
We need the versionredirect in order for the EPiServer core to load the correct version. Potentially you can try redirecting to a newer version given that it's backwards compatible with the old version. Removing the redirect will otherwise give you two different versions loaded in the same app domain which usually means trouble.
Hi, thx, but in that case I get:
Missing requested Instance property "NamedIndexingService" for InstanceKey "1c0b201e-8c75-49d0-90ce-2c9c25305f2a"
I have figured out that the line EndsWith("Service") makes the problem with NamedIndexingService.
ObjectFactory.Configure(x =>
{
x.Scan(s =>
{
s.Assembly("Mogul.Web.Framework");
s.Assembly("PROJECT.Web");
s.WithDefaultConventions();
});
...
x.SetAllProperties(
policy => policy.NameMatches(name => name.EndsWith("Service")));
...
});
Without it, the exception doesn't occur.
I have removed it, since it is a part of a default convension and in the module public class ContentInitializableModule : IInitializableModule that subscibes to content events, I am manually getting the instance of my service class in public void Initialize(InitializationEngine context):
_contentService = ObjectFactory.GetInstance<IContentService>();
Hi, I am having problems with structuremap again.
In Global.asax, I have an override of RegisterRoutes:
I have a configurable module, that gets called first (before RegisterRoutes):
I have referenced StructureMap from this location:
D:\...\trunk\src\Project.Web\packages\structuremap.2.6.4.1\lib\net40\StructureMap.dll
Now, in web.config, I am having this commented out:
When I use ObjectFactory.WhatDoIHave();, I get the following error:
The type 'StructureMap.ObjectFactory' exists in both 'StructureMap.dll' and 'StructureMap.dll'
If I uncomment the web.config part, I get:
Missing requested Instance property "NamedIndexingService" for InstanceKey "6b1c69a3-1eba-470c-95fb-492045313561"
For the version with commented out dependentAssembly in web.config, I can comment out the problematic part of code, run the app, uncomment it and it works. I would really like a real solution instead of this tweak.
Any clues on what I'm doing wrong?