I have a solution in VS2013 with the following setup:
- App.Web (Web Project with only static files)
- App.Web.API (Web API project with OWIN)
Both the projects have a default url pointing to their own localhost:portX (I am using IIS Express), so App.Web is listening on localhost:2222 and APP.Web.API is listening on localhost:3333.
I set up the App.Web.API to use OWIN and I added the package Microsoft.Owin.Host.SystemWeb for the autofire up in IIS.
I put a breakpoint in the configuration method of the OWIN startup class.
When I set the APP.Web.API as "startup project" in VS2013 the breakpoint is hitted.
But as soon I set the App.Web as "startup project" and then from the browser I make a request to the App.Web.Api, the breakpoint at the Startup class is not hitted anymore.
I tried to follow some suggestions found on the net (cleanup IIS Temp files, using OWIN attibute etc..) but it's not working.
It seems that with IIS Express the OWIN is only firing up if the project containing it is set as Startup Project.
Can someone explain what is happening?