[英]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. 我将MVC项目从Asp.net 5 RC1-final迁移到了核心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.
在我的开发计算机上,一切运行正常,但是当我将其发布到Azure WebApp时,每条路径上都显示404。 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?
您知道这可能是什么,如何获得更详细的错误报告?
The Error was that I did not add the Views under publishOption in the project.json. 错误是我没有在project.json中的publishOption下添加视图。
Before: 之前:
"publishOptions": {
"include": [
"wwwroot",
"web.config"
]
},
Now: 现在:
"publishOptions": {
"include": [
"wwwroot",
"Views",
"web.config"
]
},
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.
它应该删除目标位置上的所有文件并发布升级。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.