I'm having an issue when I build my Web Api project in Release. For some reason, I get a 404 response when I access any web api route. If I turn off 'Optimize Code' for release builds, the routes work as expected. My server is running Windows 2008 R2, IIS 7.5. I'm using ninject for IoC if that matters at all.
I've tried using http://blogs.msdn.com/b/webdev/archive/2013/04/04/debugging-asp-net-web-api-with-route-debugger.aspx but I still only get a 404.
This works if running locally (Win7).
Turns out I was running into this bug: http://aspnetwebstack.codeplex.com/workitem/1075
The production server was missing some assembly. Although I wasn't able to find it through tracing, fusion logs, etc, after upgrading to 5.2.3, the problem went away.