[英]Azure ASP.NET Core - Error 500 for new files
I'm developing an ASP.NET Core application and use Azure as Cloud server. 我正在开发ASP.NET Core应用程序,并将Azure用作云服务器。
Since yesterday all was working good, but I push to preproduction a new version of my application, and boom... 从昨天开始,一切运行良好,但是我推动了我的应用程序的新版本的预生产,并且蓬勃发展...
When I try to acceed to my new webapi controller , I have a Internal 500 error. 当我尝试使用新的webapi控制器时,出现内部500错误。 This is the log that I donwload from Kudu :
这是我从Kudu下载的日志:
My controller is very basic, and the most strange is that older controller keep running 我的控制器非常基础,最奇怪的是较旧的控制器继续运行
EDIT 编辑
The issue comes from a folder with an cshtml file that are not correclty publish to the azure website. 该问题来自带有cshtml文件的文件夹,该文件夹没有正确发布到azure网站。
This file is use to create a email from an HTML Template, and when I use the Service that call this HTML template it throw an error. 此文件用于从HTML模板创建电子邮件,当我使用调用此HTML模板的服务时,它将引发错误。
I tried to add in my csproj 我尝试添加csproj
<None Include="$(ProjectDir)/EmailTemplates/OrderCompleteEmail.cshtml" CopyToOutputDirectory="Always" />
but still not uploaded to azure... Any idea 但仍未上传到天蓝色...任何想法
I would suggest to turn on Logging: 我建议打开日志记录:
Now, you have to create a folder named "logs" in the wwwroot directory and restart your app. 现在,您必须在wwwroot目录中创建一个名为“ logs”的文件夹,然后重新启动您的应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.