I've got an azure website (MVC) configured and everything was working fine until i tried adding a WebAPI project to solution which is deployed to azure.
My virtual directory mapping looks like
- virtual ----- physical --- IsApplication
- / ----- site\wwwroot\ ------ IsApplicaiton (yes) [Path for mvc project] Application
- /api ---- site\services\ ------- IsApplication (no)
- /api/code ------ site\services\code\ ------- IsApplication (yes) [Path for WebAPI project]
The MVC application is working fine but the WebAPI application (which is blank scaffold from VS WebApplication -> WebAPI2) is not. After modifying WebApi's web.config
to disable custom errors page I found out that the problem is the namespace included in MVC application's web.config
(of course WebAPI project does not possess reference to it and it shouldn't). But why does WebAPI even bother itself with web.config
sitting in MVC application when it has its own?