Angular 应用程序成功部署在 Azure 上,但访问它时出现权限被拒绝的消息

重心

问题我正在尝试在 Azure 上部署 Angular 应用程序(Angular 版本 - 8.2.14)。我已经习惯用 Kudu 来部署应用程序,代码是从我的 Github Repo 部署的。部署状态为“成功”。

访问已部署的 Web 应用程序的 URL 时出错“您无权查看此目录或页面。”

尝试解决问题的方法要获得有关错误的更多详细信息,我尝试启用应用服务日志部分中“详细错误消息”但我也无法从中获得太多信息。我在“详细错误消息”中找到的唯一信息是“当读取 Web 服务器或 Web 应用程序的配置文件出现问题时会发生此错误。在某些情况下,事件日志可能包含有关导致此问题的原因的更多信息错误。”

我还检查了事件日志,发现以下信息,

Exception: System.IO.IOException

Message: The handle is invalid.


StackTrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.__ConsoleStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)



at System.IO.StreamWriter.Write(String value)
   at System.IO.TextWriter.SyncTextWriter.Write(String value)
   at Kudu.Core.Infrastructure.ProgressWriter.IdleWriter(Object state) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\ProgressWriter.cs:line 109
   at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
   at System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)</Data></EventData></Event><Event><System><Provider Name="HttpPlatformHandler"/><EventID>2000</EventID><Level>4</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2020-05-01T16:57:34Z"/><EventRecordID>385268109</EventRecordID><Channel>Application</Channel><Computer>RD501AC5040133</Computer><Security/></System><EventData><Data>APPLICATION_MANAGER::~APPLICATION_MANAGER | this=05B6D878 [TID 6180] [PID 5664]</Data></EventData></Event><Event><System><Provider Name=".NET Runtime"/><EventID>1026</EventID><Level>1</Level><Task>0</Task><Keywords>Keywords</Keywords><TimeCreated SystemTime="2020-05-01T16:57:35Z"/><EventRecordID>385269218</EventRecordID><Channel>Application</Channel><Computer>RD501AC5040133</Computer><Security/></System><EventData><Data>Application: w3wp.exe
Framework Version: v4.0.30319

我正在尝试其他选项(主要是检查在 Azure 上部署 Angular 应用程序的教程),但还没有幸运地解决这个问题。网页配置 目录树

    <!-- indicates that the index.js file is a node.js application 
    to be handled by the iisnode module -->

    <handlers>
      <add name="iisnode" path="index.js" verb="*" modules="iisnode" />
    </handlers>

    <!-- adds index.js to the default document list to allow 
    URLs that only specify the application root location, 
    e.g. http://mysite.antarescloud.com/ -->

    <defaultDocument enabled="true">
      <files>
        <add value="index.js" />
      </files>
    </defaultDocument>
    <system.web>
      <customErrors mode="Off" />
    </system.web>
  </system.webServer>
</configuration>
蒂贾尼·贝尔曼苏尔

根据您收到的错误消息,应用程序文件似乎未部署到预期位置。

请参考我的文章(法文):http : //espacenuagic.com/2019/03/10/deployer-une-application-angular-sur-azure-app-service/特别注意你的内容重新部署,如图:

部署角度内容

在本例中,我正在部署“angled”文件夹的内容,而不是“dist”文件夹。

我希望这会有所帮助。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

VSTS部署成功后,如何在azure应用程序服务上运行npm命令?

在Azure上部署Angular2应用程序时出现节点版本错误

如何部署到Azure上的Angular2 +的WebPack应用程序?

在github上的Azure上部署默认的angular应用程序会出错

Django Web应用程序已成功部署在Azure App Service Linux上,但只能看到Azure默认页面

将Angular 2应用程序部署到Azure

将 Angular 2 应用程序部署到 Azure

Mac上的AspNetCore应用程序的Azure部署失败

Azure功能应用程序:部署时不会触发TimerTrigger

Heroku 上的 Angular 应用程序部署问题

将Angular应用程序部署到Heroku时出错

访问node.js应用程序azure应用服务时获取权限被拒绝

在同一Azure Web应用程序中部署angular 6应用程序和Web API

在Heroku成功部署后出现应用程序错误

尝试在 azure vm 中部署 angular 应用程序时出错:

将 Angular2 应用程序发布和部署到 Azure

将Angular 7应用程序部署到Azure Web App

无法将ASP.NET Core 2.1 Angular应用程序部署到Azure

带有angular 5应用程序的Azure部署选项无法编译并建立持续集成

将多个版本的Angular应用程序部署到Azure App Service

部署 Angular 应用程序

Heroku应用程序成功部署,但在加载网站时收到应用程序错误

部署在 Azure 上时,应用程序洞察中没有数据

成功在Azure上部署Flask应用程序,但该应用程序在打开网站后无法正常工作

将Angular 5应用程序部署到Heroku时出现问题

部署到 Azure Web 应用程序时出现 ChakraCore.dll 异常

使用 terraform 部署 Azure powershell 函数应用程序时出现问题

解释-通过Microsoft Azure DevOps Pipelines部署生产NextJS应用程序时出现问题

无法访问部署到Azure Service Fabric的Web应用程序