gpt4 book ai didi

azure - 升级到 sdk 2.2 后无法调试 azure 解决方案。解决方案无需调试即可正常运行。可以将调试器附加到正在运行的模拟器

转载 作者:行者123 更新时间:2023-12-01 07:03:01 25 4
gpt4 key购买 nike

我有一个包含 2 个角色的云解决方案:1 个 Web 角色、1 个辅助角色。该解决方案最近从 sdk 2.1 升级,运行良好。

如果我在没有调试的情况下运行解决方案,例如按 Ctrl-F5,模拟器将启动并且角色将按要求运行。我什至可以将调试器附加到正在运行的角色,尽管那时我已经错过了所有角色初始化。

如果我使用调试(例如 F5)运行,模拟器将启动; worker 角色陷入“角色状态繁忙”,网络角色陷入“角色不健康”, Visual Studio 变得无响应,需要任务管理器来终止。在 VS 中,下部 RHS 中的部署动画继续运行。即使我注释掉 RoleEntryPoint 的所有 OnStart 和 Run 重写,也会发生同样的情况。无论应用程序生命周期有多早,我都无法命中任何断点,因此我非常确定这是模拟器基础设施/与调试器问题。

我当前正在使用程序集绑定(bind)登录运行,并且没有注意到任何异常情况。我检查了一遍,所有项目中的sdk引用以及所有依赖都已经升级了。

如果我在启用调试和角色诊断的情况下运行,即使其他所有内容都被卡住,我也会将与配置更新相关的条目添加到输出中。例如:

    [Diagnostics]: Checking for configuration updates 10/01/2014 

我正在寻找新的调查线索,已经用尽了我能想到的一切。顺便说一句,这不是特定于机器的,我已经在几台机器上进行了测试,它们都表现出这种行为。

编辑:我应该注意到,即使使用 2.2 sdk,其他云解决方案也是可调试的。

更新:我在日志中收到以下内容:

<Log>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Hang"/>
<EventID Qualifiers="0">1002</EventID>
<Level>2</Level>
<Task>101</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-01-17T18:53:34.000000000Z"/>
<EventRecordID>1216077</EventRecordID>
<Channel>Application</Channel>
<Computer>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</Computer>
<Security/>
</System>
<EventData>
<Data>devenv.exe</Data>
<Data>12.0.21005.1</Data>
<Data>2910</Data>
<Data>01cf13b4114dc59b</Data>
<Data>4294967295</Data>
<Data>C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe</Data>
<Data>a94194c4-7fa8-11e3-bed7-001e4fea6057</Data>
<Data/>
<Data/>
<Binary>54006F00700020006C006500760065006C002000770069006E0064006F0077002000690073002000690064006C00650000000000</Binary>
</EventData>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 4.0.30319.0"/>
<EventID Qualifiers="49152">1325</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-01-17T18:56:06.000000000Z"/>
<EventRecordID>1216080</EventRecordID>
<Channel>Application</Channel>
<Computer>xxxxxxxxxxxxxxxxxxxxxxxxxxx</Computer>
<Security/>
</System>
<EventData>
<Data>Failed to initialize the AppDomain:/LM/W3SVC/6/ROOTException: System.SystemExceptionMessage: Failed to create AppDomain.StackTrace: at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)InnerException: System.Runtime.InteropServices.COMExceptionMessage: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))StackTrace: at System.Security.Policy.PEFileEvidenceFactory.GetLocationEvidence(SafePEFileHandle peFile, SecurityZone&amp; zone, StringHandleOnStack retUrl) at System.Security.Policy.PEFileEvidenceFactory.GenerateLocationEvidence() at System.Security.Policy.PEFileEvidenceFactory.GenerateEvidence(Type evidenceType) at System.Security.Policy.AssemblyEvidenceFactory.GenerateEvidence(Type evidenceType) at System.Security.Policy.Evidence.GenerateHostEvidence(Type type, Boolean hostCanGenerate) at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type) at System.Security.Policy.Evidence.GetHostEvidence(Type type, Boolean markDelayEvaluatedEvidenceUsed) at System.Security.Policy.AppDomainEvidenceFactory.GenerateEvidence(Type evidenceType) at System.Security.Policy.Evidence.GenerateHostEvidence(Type type, Boolean hostCanGenerate) at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type) at System.Security.Policy.Evidence.GetHostEvidence(Type type, Boolean markDelayEvaluatedEvidenceUsed) at System.Security.Policy.Evidence.GetHostEvidence[T]() at System.Web.Hosting.ApplicationManager.GetDefaultDomainIdentity() at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)</Data>
</EventData>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 4.0.30319.0"/>
<EventID Qualifiers="49152">1325</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-01-17T18:56:06.000000000Z"/>
<EventRecordID>1216080</EventRecordID>
<Channel>Application</Channel>
<Computer>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</Computer>
<Security/>
</System>
<EventData>
<Data>Failed to initialize the AppDomain:/LM/W3SVC/6/ROOTException: System.SystemExceptionMessage: Failed to create AppDomain.StackTrace: at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)InnerException: System.Runtime.InteropServices.COMExceptionMessage: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))StackTrace: at System.Security.Policy.PEFileEvidenceFactory.GetLocationEvidence(SafePEFileHandle peFile, SecurityZone&amp; zone, StringHandleOnStack retUrl) at System.Security.Policy.PEFileEvidenceFactory.GenerateLocationEvidence() at System.Security.Policy.PEFileEvidenceFactory.GenerateEvidence(Type evidenceType) at System.Security.Policy.AssemblyEvidenceFactory.GenerateEvidence(Type evidenceType) at System.Security.Policy.Evidence.GenerateHostEvidence(Type type, Boolean hostCanGenerate) at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type) at System.Security.Policy.Evidence.GetHostEvidence(Type type, Boolean markDelayEvaluatedEvidenceUsed) at System.Security.Policy.AppDomainEvidenceFactory.GenerateEvidence(Type evidenceType) at System.Security.Policy.Evidence.GenerateHostEvidence(Type type, Boolean hostCanGenerate) at System.Security.Policy.Evidence.GetHostEvidenceNoLock(Type type) at System.Security.Policy.Evidence.GetHostEvidence(Type type, Boolean markDelayEvaluatedEvidenceUsed) at System.Security.Policy.Evidence.GetHostEvidence[T]() at System.Web.Hosting.ApplicationManager.GetDefaultDomainIdentity() at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)</Data>
</EventData>
</Event>
</Log>

最佳答案

我们的项目也有同样的问题。微软错误报告在这里:

https://connect.microsoft.com/VisualStudio/feedback/details/817341/vs-debugger-cannot-attach-to-azurewebrole-with-more-then-one-iis-endpointbinding-when-using-iis-reproducable#

在此链接中还有一种解决此问题的(肮脏的)方法。希望微软尽快解决这个问题。

关于azure - 升级到 sdk 2.2 后无法调试 azure 解决方案。解决方案无需调试即可正常运行。可以将调试器附加到正在运行的模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21043344/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com