I\'m getting this error as my project is not able to find the reference for OWIN startup class. I\'ve even installed all the OWIN reference packages through Nug
It is also possible to get this exception (even when you have a correctly configured startup class) if running through IIS Express and your virtual directory is not configured correctly.
When I encountered this issue, the resolution was simply to press the 'Create Virtual Directory' button in the 'Web' tab of project properties (Using Visual Studio 2013)