WebAPi throws Error: No OWIN authentication manager is associated with the request.

Vote:
 

We have implemented webApi in Episerver Commerce 10.5 version project following this article

https://world.episerver.com/blogs/rejaie-johnson/dates/2017/5/oauth-2-0--owin--web-api/

And have been getting this error that we are not able to resolve.

An error has occurred.
No OWIN authentication manager is associated with the request.
System.InvalidOperationException
at System.Web.Http.Owin.PassiveAuthenticationMessageHandler.SuppressDefaultAuthenticationChallenges(HttpRequestMessage request) at System.Web.Http.Owin.PassiveAuthenticationMessageHandler.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.HttpServer.d__0.MoveNext()
Solutions tried so far:
  1. Do NOT have this in my projetc 
    • config.SuppressDefaultHostAuthentication();       
    • config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));
  2. Have package Microsoft.Owin.Host.SystemWeb and its reference correct.
  3. Have  in we.config


#190285
Apr 06, 2018 20:20
* 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.