404 on Azure but not on local development machine
Asked Answered
E

2

0

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?

Ermine answered 24/11, 2016 at 8:29 Comment(1)
diagnostics logging?Maccaboy
E
1

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"
]
},
Ermine answered 24/11, 2016 at 11:50 Comment(0)
I
0

Check to see whether File Publish Option Remove Additional Files At Destination is checked. If it is not checked, check it and publish. It should delete all files at the destination and publish the upgrade.

Inaugurate answered 24/11, 2016 at 9:40 Comment(1)
But I assumed the problem is now solved, with explanation belowInaugurate

© 2022 - 2024 — McMap. All rights reserved.