No OWIN authentication manager is associated with the request

If you are getting this error after adding swagger to your API project here is the solution to avoid this error: In App_Start go to WebApiConfig.cs and comment the following line: