0

I created a new WebAPI project (VS 2013, .net framework 4.5.1, c#) with the example template, Added a new controller and tested this on my local computer. In my computer, everything is working good (debug \ release).

When publishing this to Azure hosting, I'm getting this error message:

ExceptionMessage=No OWIN authentication manager is associated with the request.
ExceptionType=System.InvalidOperationException
Message=An error has occurred.
StackTrace=   at System.Web.Http.Owin.PassiveAuthenticationMessageHandler.SuppressDefaultAuthenticationChallenges(HttpRequestMessage request)
   at System.Web.Http.Owin.PassiveAuthenticationMessageHandler.<SendAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()

I have no clue what the reason. So, I Googled it. Solutions I'm have tried:

I'm didn't understand, where I'm should place this code line (and replace which code line in my existing project).

Thank you for helping.

Community
  • 1
  • 1
No1Lives4Ever
  • 6,430
  • 19
  • 77
  • 140

1 Answers1

0

OK. I'm found a workaround to solve this issue.

My Work around, steps I'm made:

  1. I'm just created a new WebAPI project (default template) and upload it for a new website in Azure. Tested it. This working great. So, from here I'm understand that the problem is not in my code.
  2. Now I'm uploaded my new project and override my existing not working project. Now, my new project is stopped working too. Same problem like in my previous project.
  3. At this point I'm understand that something going bad with my Azure account. So I'm removed my old website account and create it again. Now it's working fine.

So, Just try to remove and upload your project again.

No1Lives4Ever
  • 6,430
  • 19
  • 77
  • 140