2015-10-06 26 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