asp.net mvc - ASP .Net MVC - Injecting Session with StructureMap -


i trying inject asp .net mvc session controller providing in interface using structuremap. structuremap complaints while trying httpcontext.current not initialized @ time of registry initialization. sure there way around have yet find. if can please point me right direction here, great :)

here code more information:

defaultregistry.cs:

using system.web; using company.o365web.infrastructure; using structuremap.configuration.dsl; using structuremap.graph;  namespace company.o365web.dependencyresolution {     public class defaultregistry : registry     {         #region constructors , destructors          public defaultregistry()         {             scan(scan =>             {                 scan.thecallingassembly();                 scan.withdefaultconventions();                 scan.with(new controllerconvention());             });              for<isessionstate>()                 .singleton()                 .use(new sessionstateprovider(new httpsessionstatewrapper(httpcontext.current.session)));         }          #endregion     } } 


Comments

Popular posts from this blog

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -

html - grunt SVG to webfont -