asp.netasp.net-mvcazureasp.net-core.net-core-rc1

404 on Azure but not on local development machine


I migrated a MVC project from Asp.net 5 RC1-final to core 1.0.1. On my Development machine everything runs perfect but when I publish it to Azure WebApp I get a 404 on every route. I tried to debug the site and it seems that the View can not be found. Any idea what it could be or how I can get a more detailed error report?


Solution

  • The Error was that I did not add the Views under publishOption in the project.json.

    Before:

    "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
    },
    

    Now:

    "publishOptions": {
    "include": [
      "wwwroot",
      "Views",
      "web.config"
    ]
    },