Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

No owin.Environment item was found in the context.

$
0
0

Background:

  1. installed VS and episerver plugin
  2. installed nuget episerver thing
  3. created new alloy project.  created dummy user.
  4. Added new emptyproject.
  5. Could not login. Dummy user created for Alloy nor windows login works (as am not a local admin, its a domain login)
  6. So created use programatically using this code (cant include links - causes server error when post, so including a code snippit):
https://world.episerver.com/blogs/kristoffer-linden/dates/2017/12/create-episerver-login-account-by-code/

8. Ran the project.
9. hit localhost://xxx/episerver

Get this:

Server Error in '/' Application.
No owin.Environment item was found in the context.
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.InvalidOperationException: No owin.Environment item was found in the context.
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: 
[InvalidOperationException: No owin.Environment item was found in the context.]
   System.Web.HttpContextExtensions.GetOwinContext(HttpContext context) +78
   EPiServer.Cms.UI.AspNetIdentity.<>c.<ConfigureContainer>b__0_3(IServiceLocator s) +31
   EPiServer.ServiceLocation.Internal.TypedFactory`1.<Create>b__2_0(IServiceLocator s) +13
   lambda_method(Closure , IBuildSession , IContext ) +181
[StructureMapBuildException: Failure while building 'Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Shell.Security.UISignInManager,EPiServer.Shell.Security.UISignInManager]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Shell.Security.UISignInManager])._serviceLocator)', check the inner exception for details
1.) Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Shell.Security.UISignInManager,EPiServer.Shell.Security.UISignInManager]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Shell.Security.UISignInManager])._serviceLocator)
2.) Instance of EPiServer.Shell.Security.UISignInManager
3.) Container.GetInstance(EPiServer.Shell.Security.UISignInManager)
]
   lambda_method(Closure , IBuildSession , IContext ) +491
   StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context) +92
   StructureMap.BuildSession.BuildNewInSession(Type pluginType, Instance instance) +92
   StructureMap.Pipeline.NulloTransientCache.Get(Type pluginType, Instance instance, IBuildSession session) +14
   StructureMap.BuildSession.ResolveFromLifecycle(Type pluginType, Instance instance) +47
   StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle) +128
   StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph) +100
   StructureMap.Container.GetInstance(Type pluginType) +178
   EPiServer.ServiceLocation.StructureMapServiceLocator.DoGetInstance(Type serviceType, String key) +40
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +42
[ActivationException: Activation error occurred while trying to get instance of type UISignInManager, key ""]
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +101
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance() +60
   EPiServer.ServiceLocation.Injected`1.get_Service() +36
   EPiServer.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +26

FYI, I did a clean, and restarted VS. did not help


Viewing all articles
Browse latest Browse all 9076

Trending Articles