简体   繁体   English

带有额外DLL和app.Config的AZURE Worker Role Deploy

[英]AZURE Worker Role Deploy with extra DLL's and app.Config

I'm trying to deploy an Azure Worker Role Cloud Service. 我正在尝试部署Azure工作者角色云服务。 When testing a "Hello World" scenario, it's very simple and works fine. 在测试“ Hello World”场景时,它非常简单并且运行良好。

Once I add references to custom DLL's, and EntityFramework, the Worker Role will no longer deploy. 一旦添加对自定义DLL和EntityFramework的引用,辅助角色将不再部署。 My thought is the extra DLL's and the app.config file is not getting deployed. 我的想法是多余的DLL且app.config文件未部署。

Here is the error: 这是错误:

1:25:03 PM - Uploading Package... 1:25:03 PM-正在上传软件包...

1:25:57 PM - Updating... 1:25:57 PM-正在更新...

1:29:04 PM - Your role instances have recycled a number of times during an update or upgrade operation. 下午1:29:04-在更新或升级操作期间,您的角色实例已回收了许多次。 This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent the role instances from running. 这表明服务的新版本或配置服务时提供的配置设置会阻止角色实例运行。 Verify your code does not throw unhandled exceptions and that your configuration settings are correct and then start another update or upgrade operation. 验证您的代码没有引发未处理的异常,并且您的配置设置正确,然后启动另一个更新或升级操作。

Does anyone know why it's failing and if this is possible or how to deploy a more complex worker role? 有谁知道为什么失败,这是否可能,或者如何部署更复杂的辅助角色?

Sounds like something is present locally that doesn't exist (or is not available) once deployed. 听起来好像本地存在的东西一旦部署就不存在(或不可用)。

Easiest thing to do is remotely debug your worker role: 最简单的方法是远程调试您的辅助角色:

http://msdn.microsoft.com/en-us/library/azure/ff683670.aspx#BK_Debugging_Cloud_Azure http://msdn.microsoft.com/zh-cn/library/azure/ff683670.aspx#BK_Debugging_Cloud_Azure

Both feedback items helped me resolve the error. 两个反馈项都帮助我解决了该错误。 Below are the steps: 步骤如下:

1.) I made sure I had both a web site and worker role added to the solution. 1.)我确保将网站和辅助角色都添加到了解决方案中。

2.) I verified they both ran and could be published to Azure. 2.)我确认它们都可以运行并且可以发布到Azure。

3.) I then added my custom code, and ensured the config file for the worker role was correct and working in the compute emulator. 3.)然后,我添加了自定义代码,并确保辅助角色的配置文件正确并且可以在计算模拟器中正常工作。

4.) I ensured the app.config and dll files had the property copy local to true, which ensured they were deployed. 4.)我确保app.config和dll文件的本地属性复制为true,以确保它们已部署。

5.) Deployed to Azure and it worked! 5.)部署到Azure并成功!

Thanks... 谢谢...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM