2015-10-06 49 views
6

这刚刚开始发生在最近的蓝色。我尝试了所有可以在Stack和其他论坛上找到的解决方案,但迄今为止没有任何解决方案。VS2015中的Azure调试环境开始崩溃

当我尝试在Azure的工人角色开始调试,这是据我得到:

enter image description here

在调试窗口写着:The program '[2208] WaIISHost.exe' has exited with code 0 (0x0).

我跑在视觉工作室管理模式,将正确的项目设置为启动并使用IIS Express作为开发服务器。

我试着用相同的基础项目创建一个新的Azure工作者角色,但没有奏效。系统事件日志没有任何信息。我已经尝试重新安装VS2015,并单独使用Azure SDK(v.2.7.1),无需更改。当我查看计算模拟器,它消失前说:

[fabric] Role Instance: deployment27(250).Web.0 
[fabric] Role state Unhealthy 
[fabric] Role state Stopped 

不过,我能够在解决方案,这使我相信的东西一定是跑损坏项目绑启动其他辅助角色项目莫名其妙的工人角色。我在这个阶段没有任何帮助,不胜感激。

UPDATE

望着WallSHost.log文件中C:\Users\<UserAccount>\AppData\Local\dftmp\Resources\<GUID>\directory\DiagnosticStore给我一个Invalid name错误:

WaIISHost Information: 0 : [00003568:00000001, 2015-10-06 20:02:05.472, INFO ] Attempt Deploy with RoleInstanceId=deployment27(252).Web_IN_0 RoleRoot=C:\Web\csx\Debug\roles\Web\ optional SitesDestination= 
WaIISHost Information: 0 : [00003568:00000001, 2015-10-06 20:02:08.153, ERROR] Exception:System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Invalid name. 
Parameter name: name (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: 
System.ArgumentException: Invalid name. 
Parameter name: name 
    at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext) 
    at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory) 
    at System.Security.AccessControl.DirectorySecurity..ctor(String name, AccessControlSections includeSections) 
    at System.IO.DirectoryInfo.GetAccessControl(AccessControlSections includeSections) 
    at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.FileManager.AddAllowAceIterative(DirectoryInfo dir, FileSystemRights rights, IdentityReference[] accounts) 
    at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurato...). 


WaIISHost Information: 0 : [00003568:00000001, 2015-10-06 20:02:08.157, ERROR] Exception:System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Invalid name. 
Parameter name: name (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: 
System.ArgumentException: Invalid name. 
Parameter name: name 
    at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext) 
    at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory) 
    at System.Security.AccessControl.DirectorySecurity..ctor(String name, AccessControlSections includeSections) 
    at System.IO.DirectoryInfo.GetAccessControl(AccessControlSections includeSections) 
    at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.FileManager.AddAllowAceIterative(DirectoryInfo dir, FileSystemRights rights, IdentityReference[] accounts) 
    at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurato...). 
+0

请检查事件日志。你可能会发现一些关于角色崩溃的信息。 HTH。 –

+1

@GauravMantri事件日志不多说。请在上面查看'WallSHost.log'文件中的错误。谢谢。 – GFoley83

回答

13

重新安装Visual工作室,在Azure SDK,IIS,并通过日志文件thralling后,我最后发现问题:与我的工作者角色关联的Web项目中的node_modules文件夹。

不久,我删除了文件夹,调试立即开始;即使它不是Visual Studios解决方案的一部分。

因为我已经搜索了对堆栈这个具体问题,并发现这个帖子: https://stackoverflow.com/a/28188299/654708

添加rmdir /s /q "$(ProjectDir)node_modules\"到后建立与辅助角色相关联的项目的属性内的事件,将删除node_modules文件夹在Azure调试器启动之前。不是一个完美的解决方案,但它会这样做,直到这个Windows无法处理长文件名的荒谬问题得到解决。

enter image description here

UPDATE

刚刚发现一个更好的解决方案。通过使用npm-windows-upgrade模块从这里微软开发团队更新npm为> = 3.x的:

https://www.npmjs.com/package/npm-windows-upgrade

npm 3.x中,在node_modules文件夹中的模块存储在一个平的结构。这应该有助于避免导致Azure调试器崩溃的路径上256个字符的限制(假设解决方案根目录的路径不是太长)。

默认情况下,在Windows上安装Node时,npm版本2会预绑定(截至2015年9月8日)。使用常规npm更新命令npm -g install [email protected]<version>将不起作用,因为节点将始终查看安装附带的npm版本;这是npm-windows-upgrade进来的地方。

打开具有管理员权限的Windows PowerShell并运行以下任务以选择要安装的npm的版本。

  1. Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
  2. npm install -g npm-windows-upgrade
  3. npm-windows-upgrade

enter image description here

附加读数:

https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows https://github.com/npm/npm/issues/3697#issuecomment-114665926

+1

你保存了我的培根,字符限制,男人。 - 我希望微软能够解决这个260个人物路径问题。这是疯了。 – BrainSlugs83

+0

谢谢。不知道你是怎么想出来的,但是现在我已经停止撞墙了,我的头感觉好多了。 – Ryan