这种情况最近才开始突然发生。我尝试了在 Stack 和其他论坛上可以找到的所有解决方案,但到目前为止都没有奏效。
当我尝试开始调试 Azure 辅助角色时,这是我得到的:
调试窗口显示:The program '[2208] WaIISHost.exe' has exited with code 0 (0x0).
我在管理模式下运行 Visual Studio,将正确的项目设置为启动并使用 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
但是,我能够在解决方案中启动其他工作人员角色项目,这让我相信项目中一定有某些东西已经损坏,以某种方式与损坏的工作人员角色相关联。在这个阶段我没有想法,所以非常感谢任何帮助。
更新
查看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...).