Owin error on registration

  • Updated

When attempting to register a user or perform an owin authentication action, you may run into the following error.

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: 

Line 72: get
Line 73: {
Line 74: return ServiceLocator.Current.GetInstance<UIUserProvider>();
Line 75: }

To resolve this error, please make sure that you have setup Owin Authentication per the guide below.

If you are still running into the issue, check to see if the <compilation> tag in the web.config has the attribute "optimizeCompilations" = true and change it to false.