OWIN Startup class not detected

I've seen quite a lot of people running into the issue where their OWIN startup class is not detected. Here are some of the more common reasons why the OWIN startup class is not detected.

  • Check if your IIS application pool is in Integrated mode. Note: Running of an OWIN middleware is supported only on IIS Integrated pipeline. Classic pool is not supported. 
  • Check if you have Microsoft.Owin.Host.SystemWeb Nuget package installed. This package is required for the OWIN startup class detection.
  • [Learnt from comments - Thanks @Eric]: If your Startup class is still not detected in IIS, try it again by clearing the ASP.net temporary files. 

Here is a detailed article on OWIN startup class detection for reference.