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

Vote:
 

Hi,

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.
#207595
Edited, Sep 26, 2019 14:02
Vote:
 

Hi,

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" />
#207624
Edited, Sep 27, 2019 7:59
Vote:
 

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 ?

#207626
Sep 27, 2019 9:07
Vote:
 

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

https://stackoverflow.com/questions/18232549/no-owin-environment-item-was-found-in-the-context

#207629
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.