Azure websites complaining Role environment . FAILED TO INITIALIZE on startup(Azure 网站抱怨角色环境.启动时无法初始化)
问题描述
我的问题类似于 Azure 网站抱怨角色环境 .初始化失败
我在 Azure 应用服务支持事件查看器中看到的错误:
Error that I see in the Azure App Service Support Event Viewer:
"9236w3wp角色环境.初始化失败.小时:-2147024891"
" 9236 w3wp Role environment . FAILED TO INITIALIZE. hr: -2147024891 "
每次网站启动时都会发生这种情况.除此之外 - 网站功能很好.除了随机(可能需要 10-30 分钟)它以应用程序已终止"停止.(我通过 azure 应用程序日志看到了这个错误).我不确定这两件事是否相关,但我正在尝试首先解决初始化失败"的问题.
It happens every single time on startup of the website. Other than that - website functions just fine. Except, randomly (it might take 10-30 minutes) it stops with "The application was terminated." (i see this error through azure application logs). I am not sure if these two things are related, but I am trying to first fix the "FAILED TO INITIALIZE" issue.
我的代码中的任何地方都没有对 RoleEnvironment 的引用(StackOverflow 上的一些用户提到这可能是一个问题).
I don't have references to RoleEnvironment anywhere in my code (some users on StackOverflow mentioned that this might be an issue).
我阅读了很多帖子,但似乎没有一个适合我的情况.
I read through many posts but none seem to work for my case.
推荐答案
所以,问题是对Microsoft.WindowsAzure.Configuration"的引用.一旦不再引用此程序集 - 启动时不再出现错误.显然,此程序集旨在用于云服务,而不是 Web 应用程序.
So, the issue was the reference to "Microsoft.WindowsAzure.Configuration". Once this assembly is not referenced anymore - no more errors on startup. Apparently, this assembly is designed to be used with Cloud Services, not Web Applications.
这篇关于Azure 网站抱怨角色环境.启动时无法初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Azure 网站抱怨角色环境.启动时无法初始化


基础教程推荐
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- c# Math.Sqrt 实现 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01