Windows Azure Project Web角色入口点主机已停止错误

我刚刚开始为Azure开发。 我创建了一个具有Asp.net角色的Azure项目,但是当我尝试调试它而不进行任何更改时,它会出现以下错误:“windows azure web role入口点主机已停止工作”。

检查%UserProfile%\ AppData \ Local \ Temp目录。 你应该在那里看到几个文件,包括IISConfigurator.log

对于我在SDK v1.6上的路径是%UserProfile%\ AppData \ Local \ dftmp \ IISConfiguratorLogs \ IISConfigurator.log (小心最新的SDK, 看起来他们已经改变了路径 )问题在于‘添加’访问用户IUSR和NT AUTHORITY \ NETWORK SERVICE到路径%MyPathOnTheBuildMachine% ‘:

IISConfigurator Information: 0 : [00004816:00000004, 2011/12/08 13:01:51.971] Adding access to users IUSR and NT AUTHORITY\NETWORK SERVICE to path %MyPathOnTheBuildMachine% IISConfigurator Information: 0 : [00004816:00000004, 2011/12/08 13:01:51.972] Caught exception IISConfigurator Information: 0 : [00004816:00000004, 2011/12/08 13:01:51.974] Exception:System.InvalidOperationException: Method failed with unexpected error code 3. 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.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.IISConfigurator.FileManager.AddAllowAce(DirectoryInfo dir, FileSystemRights rights, Boolean inherit, IdentityReference[] accounts) at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.Security.AddAppPoolSidAceToVdir(String appPoolName, String sitePath, String appPoolSid) at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.IISConfigurator.Deploy(String roleId, WebAppModel appModel, String roleRootDirectory, String sitesDestinationDirectory, String diagnosticsRootFolder, String roleGuid, Dictionary`2 globalEnvironment) 

事实certificate,我在一台机器上打包(cspack)我的解决方案,但试图在另一台机器上运行它(csrun)。 因此,它尝试将权限赋予一台计算机上存在的目录,但在另一台计算机上不存在。

很多人确定你在同一台机器上cspack和csrun你的代码(例如,当你进行自动构建和部署时可能不是这种情况)。

检查%UserProfile%\ AppData \ Local \ Temp目录。 您应该看到一些文件,包括IISConfigurator.log和Visual Studio Web Debugger.log。 看看这些文件告诉你什么。

更新:以后的SDK将它们放在%UserProfile%\ AppData \ Local \ dftmp \ IISConfiguratorLogs \