Azure environment debugging in VS2015 failed to start

It has just begun recently. I tried all the solutions that I can find on Stack and other forums, but nothing has worked so far.

When I try to start debugging an Azure working role, this is as far as I can:

enter image description here

The debug window says: The program '[2208] WaIISHost.exe' has exited with code 0 (0x0).

I am running Visual Studios in administrative mode, with the correct project set as launch, and using IIS Express as the dev server.

I tried to create a new Azure worker role with the same base project, but that didn't work. System event logs do not contain any information. I tried to reinstall VS2015 and separately Azure SDK (v.2.7.1), without changes. When I look at the computational emulator before it disappears, it says:

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

However, I can start other role-playing projects in the solution, which makes me think that something was supposed to go bad in a project tied to a broken role. At this stage, I have no ideas, so any help is greatly appreciated.

UPDATE

Viewing the WallSHost.log file inside C:\Users\<UserAccount>\AppData\Local\dftmp\Resources\<GUID>\directory\DiagnosticStore gives me an Invalid name error:

 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...). 
+6
source share
2 answers

After reinstalling Visual Studios, Azure SDK, IIS and moving through the log files, I finally found a problem: the node_modules folder in the web project related to my working role.

Soon, when I deleted the folder, debugging began immediately; even if it is not part of the Visual Studios solution.

Since then, I have been looking for this specific problem on Stack and found this post: fooobar.com/questions/995308 / ...

Adding rmdir /s /q "$(ProjectDir)node_modules\" to post-build events inside the project properties associated with the working role will delete the node_modules folder before starting the Azure debugger. Not an ideal solution, but it will be done until this ridiculous Windows issue that cannot handle long file names is fixed.

enter image description here

UPDATE

Just found a better solution. Upgrade npm to> = 3.x using the npm-windows-upgrade module from the Microsoft development team:

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

In npm 3.x, the modules in the node_modules folder are stored in a flat structure. This should help avoid the 256 character limit on the path that causes the Azure debugger to shut down (assuming the path to the root of your solution is not too long).

By default, when installing Node on Windows, npm version 2 is bundled (starting September 8, 2015). Using the normal npm update command npm npm -g install npm@ <version> will not work, since Node will always watch the version of npm that is included with the installation; where is npm-windows-upgrade .

Open Windows PowerShell with administrator privileges and complete the following tasks to select the version of npm that you want to install.

  • Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
  • npm install -g npm-windows-upgrade
  • npm-windows-upgrade

enter image description here

Additional Information:

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

+13
source

Run as administrator of Visual Studio.

0
source

All Articles