Try our conversational search powered by Generative AI!

After Updating Episerver to latest version - No owin.Environment item was found in the context.



After upating the packages to the latest version and on hosting the solution in IIS Server, I am getting this error .

No owin.Environment item was found in the context.
When apicontrollers are hit from a different domain. Help me with this issue.
Edited, Sep 26, 2019 14:02


Please provide more information regarding the version(Old/New) of Episerver etc..

One more thing does it work if you set the optimizeCompilations setting to false in your website web.config?

 <compilation debug="true" targetFramework="4.6.2" optimizeCompilations="false" />
Edited, Sep 27, 2019 7:59

The cms was updated from 11.9.3 to 11.13.0 and commerce from 12.5.0 to 13.7.1.

Yeah it worked on setting optimizeCompilations to false. Is this the correct solution for this issue ?

Sep 27, 2019 9:07

If you set this property to false it will not optimize the compiled code files.

So I think instead of this you should try these things first.

  1. Remove the "bin" and "obj" folder from your solution(all projects).
  2. Clean the solution
  3. Rebuild the solution.
  4. If you are using the publish folder then please remove the "bin" folder from there as well.

If the above steps solve your problem then you are good. Otherwise, you can also try setting the defaultLanguage to C#

<compilation debug="true" defaultLanguage="c#" optimizeCompilations="true" targetFramework="4.6.1">

or try the different solution given here

Edited, Sep 27, 2019 9:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.