Windows Azure Hello World 示例失败:一个或多个角色的启动角色失败
我无法运行 Windows Azure Hello World 示例。它给我以下错误:
“一个或多个角色的启动角色失败”。
我将项目放在 D 驱动器的根目录中,以确保路径长度不是问题。我还清除了 Azure 临时文件夹。
我使用的是新发布的1.4版本的SDK。
I can't run the Windows Azure Hello World sample. It gives me the following error:
"Start role failed for one or more roles".
I put the project in the root of my D drive to be sure that path length is not an issue. I also cleared the Azure temp folder.
I am using the newly released version 1.4 of the SDK.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此问题的一个常见原因是开发结构(也称为“计算模拟器”)没有在本地计算机上以管理员身份运行。如果您手动启动计算结构,这可能就是原因。如果您从 Visual Studio 启动计算模拟器(例如按 F5),它将启动以管理员身份运行的计算模拟器,前提是 VS 实例以管理员身份运行(您必须在“开始”菜单中右键单击 VS,然后选择“以管理员身份运行”) “以这种方式运行)。
另一个原因是Web角色是启动项目而不是Azure服务。 Azure 服务(其下带有 .cscfg 的服务)必须是启动项目(右键单击它并选择“设置为启动项目”)。
One common cause of this problem is that the development fabric (also known as "compute emulator") isn't running as Administrator on the local machine. If you manually start the compute fabric, this may be the reason. If you start the compute emulator from Visual Studio (e.g. by pressing F5), it will start the compute emulator running as administrator provided the VS instance is running as Administrator (you have to right click VS in the Start menu and select "Run As Administrator" to run it that way).
Another cause is that the web role is the startup project rather than the Azure service. The Azure service (the one with the .cscfg under it) has to be the startup project (right click on it and select "Set as Startup Project").
听起来您的角色之一的 OnStart 方法有异常。我会:
1)确保所有异常都得到处理
2)开始记录异常或放置断点以查看发生了什么
Sounds like you have an exception in the OnStart method of one of your Role(s). I would:
1) Make sure that all exceptions are handled
2) Start logging the exceptions or put a breakpoint to see what's happening