简体   繁体   English

404在Azure上但不在本地开发计算机上

[英]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.

相关问题 SQL Azure多实例Web角色:-会话在本地计算机上不起作用 - SQL Azure multiple instances web role :- session not working on local machine 404当我尝试从部署Azure Web角色的计算机打开站点时 - 404 when I try to open the site from the machine where Azure web role is deployed 在Azure上部署的Web无法访问.less文件(错误代码404)。 本地IIS部署可以正常工作 - Deployed web on Azure cannot access a .less file (error code 404). Local IIS deployment works without error 在本地IIS上以及在部署到Azure时,ASP.NET MVC处理404错误的方式不同 - ASP.NET MVC handles 404 errors differently on local IIS and when deployed to Azure 在另一台开发机上使用数据库 - Using database on another development machine 是否可以在开发机器上模拟子域? - Is it possible to simulate subdomain on a development machine? 测试本地网站(开发中) - Test local website (in development) “Microsoft.ACE.OLEDB.12.0”提供程序未在本地计算机 MS Azure 上注册。 (具体答案) - The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine MS Azure. (Concrete answer) 在本地机器上使用 Azure 存储模拟器时找不到上传的图像 - cannot find uploaded image when using Azure Storage Emulator in local machine Azure CDN Web应用程序404 - Azure CDN WebApp 404
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM