5

我有 MVC 3 应用程序,它曾经在 osFamily 1 (Win 2008 SP2) 和 .Net 4.0 上运行良好,并且想升级到 .Net 4.5 和 Windows 2012。

我的项目已升级到 .Net 4.5,它的构建没有任何问题,并且在模拟器中运行也没有问题。

当我将角色部署到 Windows Azure 时,我收到此消息 -

“回收(等待角色开始......站点已部署。[2013-06-01T10:43:59Z])”

我远程登录到机器,我在 Windows 事件查看器中发现了以下错误消息。

错误信息 1

Log Name:      Application
Source:        Application Error
Date:          6/1/2013 10:15:39 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      RD00155D492637
Description:
Faulting application name: WaHostBootstrapper.exe, version: 6.0.6002.18488, time stamp: 0x50a71329
Faulting module name: ntdll.dll, version: 6.2.9200.16420, time stamp: 0x505ab405
Exception code: 0xc0000005
Fault offset: 0x0000000000005d92
Faulting process id: 0xadc
Faulting application start time: 0x01ce5eb0eff6e9f1
Faulting application path: E:\base\x64\WaHostBootstrapper.exe
Faulting module path: D:\Windows\SYSTEM32\ntdll.dll
Report Id: 34c3ae25-caa4-11e2-93ef-00155d492637
Faulting package full name: 
Faulting package-relative application ID: 
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2013-06-01T10:15:39.000000000Z" />
    <EventRecordID>8187</EventRecordID>
    <Channel>Application</Channel>
    <Computer>RD00155D492637</Computer>
    <Security />
  </System>
  <EventData>
    <Data>WaHostBootstrapper.exe</Data>
    <Data>6.0.6002.18488</Data>
    <Data>50a71329</Data>
    <Data>ntdll.dll</Data>
    <Data>6.2.9200.16420</Data>
    <Data>505ab405</Data>
    <Data>c0000005</Data>
    <Data>0000000000005d92</Data>
    <Data>adc</Data>
    <Data>01ce5eb0eff6e9f1</Data>
    <Data>E:\base\x64\WaHostBootstrapper.exe</Data>
    <Data>D:\Windows\SYSTEM32\ntdll.dll</Data>
    <Data>34c3ae25-caa4-11e2-93ef-00155d492637</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event> 

错误信息 2

Log Name:      Application
Source:        .NET Runtime
Date:          6/1/2013 10:15:39 AM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      RD00155D492637
Description:
Application: CacheDumpGenerator.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
Stack:
   at <Module>.RdGetLocalResource(UInt16*, _RD_RESOURCE**)
   at <Module>.RdGetLocalResource(UInt16*, _RD_RESOURCE**)
   at <Module>._LOCALRESOURCE.GetLocalResourceW(UInt16*, _LOCALRESOURCE**)
   at Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropRoleManager.GetLocalResource(System.String, Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropLocalResource ByRef)
   at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetLocalResource(System.String)
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureUtility.GetLocalStoreDirectory()
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.InitializeTraceProvider()
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.get_TraceProvider()
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.WriteLog(System.String, System.Diagnostics.TraceEventType, System.String)
   at Microsoft.ApplicationServer.Caching.CacheDumpGenerator.ProcessDump.Main(System.String[])

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2013-06-01T10:15:39.000000000Z" />
    <EventRecordID>8188</EventRecordID>
    <Channel>Application</Channel>
    <Computer>RD00155D492637</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: CacheDumpGenerator.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
Stack:
   at &lt;Module&gt;.RdGetLocalResource(UInt16*, _RD_RESOURCE**)
   at &lt;Module&gt;.RdGetLocalResource(UInt16*, _RD_RESOURCE**)
   at &lt;Module&gt;._LOCALRESOURCE.GetLocalResourceW(UInt16*, _LOCALRESOURCE**)
   at Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropRoleManager.GetLocalResource(System.String, Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropLocalResource ByRef)
   at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetLocalResource(System.String)
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureUtility.GetLocalStoreDirectory()
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.InitializeTraceProvider()
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.get_TraceProvider()
   at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.WriteLog(System.String, System.Diagnostics.TraceEventType, System.String)
   at Microsoft.ApplicationServer.Caching.CacheDumpGenerator.ProcessDump.Main(System.String[])
</Data>
  </EventData>
</Event>

错误信息 3

Log Name:      Application
Source:        Application Error
Date:          6/1/2013 10:15:39 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      RD00155D492637
Description:
Faulting application name: CacheDumpGenerator.exe, version: 1.0.4797.0, time stamp: 0x506f41e8
Faulting module name: KERNELBASE.dll, version: 6.2.9200.16451, time stamp: 0x50988aa6
Exception code: 0xc06d007e
Fault offset: 0x000000000003811c
Faulting process id: 0x1934
Faulting application start time: 0x01ce5eb0f71984a5
Faulting application path: E:\plugins\Caching\CacheDumpGenerator.exe
Faulting module path: D:\Windows\system32\KERNELBASE.dll
Report Id: 34e2aca6-caa4-11e2-93ef-00155d492637
Faulting package full name: 
Faulting package-relative application ID: 
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2013-06-01T10:15:39.000000000Z" />
    <EventRecordID>8189</EventRecordID>
    <Channel>Application</Channel>
    <Computer>RD00155D492637</Computer>
    <Security />
  </System>
  <EventData>
    <Data>CacheDumpGenerator.exe</Data>
    <Data>1.0.4797.0</Data>
    <Data>506f41e8</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>6.2.9200.16451</Data>
    <Data>50988aa6</Data>
    <Data>c06d007e</Data>
    <Data>000000000003811c</Data>
    <Data>1934</Data>
    <Data>01ce5eb0f71984a5</Data>
    <Data>E:\plugins\Caching\CacheDumpGenerator.exe</Data>
    <Data>D:\Windows\system32\KERNELBASE.dll</Data>
    <Data>34e2aca6-caa4-11e2-93ef-00155d492637</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>

服务配置.Cloud.csfg

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="OpenSpaceAzureDeploymentTesting" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2012-10.1.8">
  <Role name="OpenSpaceGUI">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="***" />
      <Setting name="DataConnectionString" value="***" />
      <Setting name="InMaintenanceMode" value="false" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="***" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="RxM6fiusFUxD/10qlvm0xvwMMBy0qbcGpsMRQUUufHD3DlUnJcaASHP0ygRESmvQDPh2ig0FsA0WK65UDrIJxFnBmRTH4WMPmJIlBa5w2Uht/g7wScwZ3UWN6NEQiHpdCPJSayef2iO3VVXRXxZYiHNdP25sMglcEmPQkVVyE4icoVHhFPffjR24uH7uNf8GK83jIbYYAcPKlVOE84pt5a/EPXG1vBQivf9nxRW84Z2jMxmectqi7Ip0tMjWnZx/IE9J28DwhKmnQSn3wlE4/qqGNxVOSp33VvAMDsGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIwFSSGHiZSSeAGH3U73yNANRQw6W4sIlmu1lpNEXv2mdWzQ==" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2050-01-01T23:59:59.0000000+00:00" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
      <Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{&quot;caches&quot;:[{&quot;name&quot;:&quot;default&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:2},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;companies&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:2},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;person&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:2},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0}]}" />
      <Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" />
      <Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" />
      <Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="****" />
      <Setting name="SiteStatus" value="ok" />
    </ConfigurationSettings>
    <Certificates>
      <Certificate name="*.co.uk" thumbprint="**" thumbprintAlgorithm="sha1" />
      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="BA399EA1E35B7E3FB00569C0FE1BCA76939EE87F" thumbprintAlgorithm="sha1" />
    </Certificates>
  </Role>
</ServiceConfiguration>

任何帮助将不胜感激 !!

谢谢巴韦什


我确实尝试通过从 NuGet 中删除包来从我的项目中删除 Windows.Azure.Caching,我尝试将它们部署到云并且 Web 角色已成功部署,但我无法浏览到我的应用程序,因为它在抱怨web.config。

我发现下面的代码仍然存在于 web.config 中,并且没有被 nuGet 清理。

<dataCacheClients>
    <dataCacheClient>
      <autoDiscover isEnabled="true" identifier="OpenSpaceGUI" />

    </dataCacheClient>
</dataCacheClients>

我从 web.config 中删除了上面的代码并再次部署到云中,但是 Web 角色在无端循环中循环使用没有运气,我在远程登录到服务器后发现了这个错误详细信息。

Log Name:      Microsoft-Azure-IISConfigurator/Operational
Source:        Microsoft-Azure-IISConfigurator
Date:          6/5/2013 9:25:38 PM
Event ID:      3303
Task Category: None
Level:         Error
Keywords:      
User:          SYSTEM
Computer:      RD00155D49FC3E
Description:
Exception:System.Runtime.InteropServices.COMException (0xC00CEF03): Exception from HRESULT: 0xC00CEF03

Server stack trace: 
   at Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.CommitChanges()
   at Microsoft.Web.Administration.Configuration.CommitChanges()
   at Microsoft.Web.Administration.ConfigurationManager.CommitChanges()
   at Microsoft.Web.Administration.ServerManager.CommitChanges()
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.WasManager.DeploySite(String roleId, WASite roleSite, String appPoolName, String sitePath, String iisLogsRootFolder, String failedRequestLogsRootFolder, List`1 bindings, List`1 protocols, FileManager fileManager, WAAppPool defaultAppPoolSettings, String roleGuid, String& appPoolSid, List`1 appPoolsAdded, String configPath)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.WasContainer.DeploySite(String roleId, WASite roleSite, String appPoolName, String sitePath, String iisLogsRootFolder, String failedRequestLogsRootFolder, List`1 bindings, List`1 protocols, FileManager fileManager, WAAppPool defaultAppPoolSettings, String roleGuid, String& appPoolSid, List`1 appPoolsAdded, String configPath)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.IISConfigurator.Deploy(String roleId, WebAppModel webAppModel, String roleRootDirectory, String sitesDestinationRootDirectory, String diagnosticsRootDirectory, String roleGuid, String configPath)

我现在不知道为什么这不起作用,任何帮助将不胜感激。

谢谢

4

2 回答 2

1

如果您需要 .NET 4.5 支持,您需要在 OS 系列 3 中运行您的应用程序。您需要在ServiceConfiguration.Cloud.cscfg文件中指定它

<ServiceConfiguration serviceName="XXX" 
    xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"
    osFamily="3" 
    osVersion="*" 
    schemaVersion="2012-10.1.8">

可能无法升级您的实例,您可能必须部署一个新实例。

有关Azure 博客的更多详细信息


更新

当您的 azure 服务出现问题时(通常没有任何有用的详细信息),WaHostBootstrapper.exe 将失败,因此很难确定究竟是什么问题。它可能像缺少参考一样简单。

从您发布的内容看来,您的一些Microsoft.WindowsAzure.Plugins也遇到了困难。我会尝试删除它们,看看角色是否仍然失败。

旁注 - 不再需要在您的 cscfg 文件中指定远程访问。来自ScottGu 的博客

Windows Azure 云服务支持开发人员将 RDP 导入 Web 和
辅助角色实例的能力。这在调试问题时很有用。

在今天发布之前,开发人员必须在开发期间明确启用 RDP 支持——在将云服务部署到生产之前。如果您忘记启用此功能,然后在生产中遇到问题,则您无法在不进行应用更新和重新部署的情况下使用 RDP(然后等待再次遇到问题)。

在今天的版本中,我们增加了支持,使管理员能够动态
配置远程桌面支持——即使在初始
应用程序部署期间未启用它。这可确保您始终可以在生产环境中调试问题,而
无需重新部署应用程序即可将 RDP 放入其中。

于 2013-06-01T22:04:30.063 回答
0

如果您可以与机器建立远程桌面连接,那么就这样做,而不是仅仅查看事件查看器,打开 IIS 管理器并浏览到您的网站。

对我来说,这通常会显示一个 ASP.NET 黄屏错误,标识任何未包含在已部署 Azure 包中的所需文件。您应该将这些文件标记为“Copy Local=true”并重新部署 - 您可能需要多次执行此操作以捕获所有丢失的文件。

于 2014-08-27T00:25:58.497 回答