[英]Angular app shows error after Azure deploy
I have an Angular App that shows a map using the "leaflet" package and afterwards draws some data from a file on that map. The App works perfectly on localhost but when I deploy it to "Azure Web App" it shows the following error: Error on server我有一个 Angular 应用程序,它使用“传单”package 显示 map,然后从该 map 上的文件中提取一些数据。该应用程序在本地主机上运行完美,但是当我将它部署到“Azure Web 应用程序”时,它显示以下错误:服务器错误
Has anyone seen that error before and knows how to solve it?有没有人以前见过这个错误并且知道如何解决它?
Thanks in advance, Paul提前致谢, 保罗
Thank you SnehaAgrawal-MSFT ,Posting your suggestion as an answer to help other community members.谢谢SnehaAgrawal-MSFT ,发布您的建议作为帮助其他社区成员的答案。
"Just to confirm in your Application Settings if you have any of the files sited here in the /home/site/wwwroot folder? If not, this could be a reason for this error. If so, recommend you go to your app service, under settings Click Configuration > Path mappings > You will see "Virtual applications and directories. “如果您在 /home/site/wwwroot 文件夹中有任何文件,请在您的应用程序设置中确认一下?如果没有,这可能是导致此错误的原因。如果是这样,建议您使用 go 访问您的应用程序服务,在设置下单击配置 > 路径映射 > 您将看到“虚拟应用程序和目录。
Your virtual path should be "/" and physical path should be "site/wwwroot/" Change your Physical path to "site/wwwroot/'appname'" "appname" should be whatever the name of your application is.您的虚拟路径应该是“/”,物理路径应该是“site/wwwroot/” 将您的物理路径更改为“site/wwwroot/'appname'” “appname”应该是您的应用程序的名称。 Or it should be whatever folder is inside of your "dist".或者它应该是你的“dist”中的任何文件夹。
You can refer to this blog for How to Deploy an Angular application to Azure Web Service " 如何将Angular应用部署到Azure Web服务可以参考这篇博客》
For more information please refer the below links:有关更多信息,请参阅以下链接:
. . Server Error in '/' Application while deploying a Angular App on Azure | 在 Azure 上部署 Angular 应用程序时“/”应用程序出现服务器错误 | SO THREAD . 所以线程。
. . Unable to deploy React JS application on Azure App service | 无法在 Azure 应用服务上部署 React JS 应用 | SO THREAD 所以线程
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.