This section lists some of the common causes of deployment problems, and offers troubleshooting tips to help you resolve the problems. An indication that a problem exists with an application is when the role instance fails to start, or it cycles between the initializing, busy, and stopping states.

    Missing Runtime Dependencies

    If a role in your application relies on any assembly that is not part of the .NET Framework or the Windows Azure managed library, you must explicitly include that assembly in the application package. Keep in mind that other Microsoft frameworks are not available on Windows Azure by default. If your role relies on such a framework, you must add those assemblies to the application package.

    Before you build and package your application, verify the following:

    • The Copy Local property is set to True for each referenced assembly in your project that is not part of the Windows Azure SDK or the .NET Framework, if you are using Visual Studio. If you are not using Visual Studio, you must specify the locations for referenced assemblies when you call CSPack. For more information about using CSPack, seeCSPack Command-Line Tool.
    • The web.config file does not reference any unused assemblies in the compilation element, and all references point to assemblies that are either part of the .NET Framework or the Windows Azure SDK, or that have their Copy Local property set to True in Visual Studio, or that are included in the application package by running CSPack.
    • The Build Action of every .cshtml file is set to Content. This ensures that the files will appear correctly in the package and allows other referenced files to appear in the package.

    Assembly Targets Wrong Platform

    Windows Azure is a 64-bit environment. Therefore, .NET assemblies compiled for a 32-bit target won't work on Windows Azure.

    Role Throws Unhandled Exceptions While Initializing or Stopping

    Any exceptions that are thrown by the methods of the RoleEntryPoint class, which includes the OnStart, OnStop, and Run, are unhandled exceptions. If an unhandled exception occurs in one of these methods, the role will recycle. If the role is recycling repeatedly, it may be throwing an unhandled exception each times it tries to start.

    Role Returns from Run Method

    The Run method is intended to run indefinitely. If your code overrides the Run method, it should sleep indefinitely. If the Run method returns, the role recycles.

    Incorrect DiagnosticsConnectionString Setting

    If application uses Windows Azure Diagnostics, then your service configuration file must specify the DiagnosticsConnectionString configuration setting. This setting should specify an HTTPS connection to your storage account in Windows Azure.

    To ensure that your DiagnosticsConnectionString setting is correct before you deploy your application package to Windows Azure, verify the following:

    • The DiagnosticsConnectionString setting points to a valid storage account in Windows Azure. By default, this setting points to the emulated storage account, so you must explicitly change this setting before you deploy your application package. If you do not change this setting, an exception is thrown when the role instance attempts to start the diagnostic monitor. This may cause the role instance to recycle indefinitely.
    • The connection string is specified in the following format (the protocol must be specified as HTTPS). Replace MyAccountName with the name of your storage account, andMyAccountKey with your access key:
      DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=MyAccountKey
      For more information about using connection strings, see Configuring Windows Azure Connection Strings.

    If you are developing your application using the Windows Azure Tools for Microsoft Visual Studio, you can use the property pages to set this value. For more information about using Visual Studio to set the configuration values, see Configuring the Cloud Service.

    Exported Certificate Does Not Include Private Key

    To run a web role under SSL, you must ensure that your exported management certificate includes the private key. If you use the Windows Certificate Manager to export the certificate, be sure to select the Yes, export the private key option. The certificate must be exported to the PFX format, which is the only format currently supported.

    See Also

    Concepts

    Troubleshooting and Debugging in Windows Azure

    来自 <http://msdn.microsoft.com/en-US/us/library/windowsazure/gg465402.aspx>

Common Issues Which Cause Roles to Recycle的更多相关文章

  1. Fixing common issues when hosting a .NET 4.0 WCF service in IIS 7

    http://sandrinodimattia.net/fixing-common-issues-when-hosting-a-net-4-0-wcf-service-in-iis-7/ Until ...

  2. Master Note for Transportable Tablespaces (TTS) -- Common Questions and Issues (Doc ID 1166564.1)

    APPLIES TO: Oracle Database Cloud Exadata Service - Version N/A and laterOracle Database Cloud Servi ...

  3. 10 Common Problems Causing Group Policy To Not Apply

    10 Common Problems Causing Group Policy To Not Apply Group Policy is a solid tool and is very stable ...

  4. Docker on YARN在Hulu的实现

    这篇文章是我来Hulu这一年做的主要工作,结合当下流行的两个开源方案Docker和YARN,提供了一套灵活的编程模型,目前支持DAG编程模型,将会支持长服务编程模型. 基于Voidbox,开发者可以很 ...

  5. Java性能提示(全)

    http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLi ...

  6. windows msiexec quiet静默安装及卸载msi软件包

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoUAAAA4CAIAAAAEgBUBAAAIj0lEQVR4nO2dQXLcOAxFdbXJ0aZys6

  7. 2019.3.5 L261 Are All Our Organs Vital?

    Medicine has not always shown a lot of respect for the human body. Just think about the ghoulish dis ...

  8. windows快捷命令修炼

    Description Windows Key combination Open/Close the Start Menu Windows key Open the Action center. Wi ...

  9. 使用可移动表空间(TTS)的最佳做法 (Doc ID 1457876.1)

    Best Practices for Using Transportable Tablespaces (TTS) (Doc ID 1457876.1) APPLIES TO: Oracle Datab ...

随机推荐

  1. spring中各jar功能及jar包之间的依赖关系

    (1) spring-core.jar 这个jar文件包含Spring框架基本的核心工具类,Spring其它组件要都要使用到这个包里的类,是其它组件的基本核心,当然你也可以在自己的应用系统中使用这些工 ...

  2. jstl 中<c:forEach />标签

    <c:forEach>标签有如下属性: 属性 描述 是否必要 默认值 items 要被循环的信息 否 无 begin 开始的元素(0=第一个元素,1=第二个元素) 否 0 end 最后一个 ...

  3. ASP.NET 跨域

    #region 支持跨域请求 //Response.ClearHeaders(); string origin = Request.Headers["Origin"]; Respo ...

  4. shell 面试题

      1. 用sed修改test.txt的23行test为tset:     sed –i ‘23s/test/tset/g’ test.txt 2. 查看/web.log第25行第三列的内容.     ...

  5. MordenPHP阅读笔记(一)——先跑再说,跑累了再走

    ---恢复内容开始--- 后台一大堆半成品,或者是几乎不成的... 这本书不错,起码是别人推荐的,然后也是比较新的东西,学哪本不是学嘛,关键是得看. 今儿个网不好,科研所需的代码下不到,看书做笔记吧. ...

  6. JustWeEngine - 轻量级游戏框架

    JustWeEngine - 轻量级游戏框架 An easy open source Android game engine. Github地址 引擎核心类流程图 使用方法 引入Engine作为Lib ...

  7. 第9章 用内核对象进行线程同步(3)_信号量(semaphore)、互斥对象(mutex)

    9.5 信号量内核对象(Semaphore) (1)信号量的组成 ①计数器:该内核对象被使用的次数 ②最大资源数量:标识信号量可以控制的最大资源数量(带符号的32位) ③当前资源数量:标识当前可用资源 ...

  8. 第8章 用户模式下的线程同步(4)_条件变量(Condition Variable)

    8.6 条件变量(Condition Variables)——可利用临界区或SRWLock锁来实现 8.6.1 条件变量的使用 (1)条件变量机制就是为了简化 “生产者-消费者”问题而设计的一种线程同 ...

  9. Red5 第一个例子之HelloWorld

    http://yerik.blog.51cto.com/1662422/1343993

  10. Nginx/Apache服务连接数梳理

    统计连接数,使用netstat命令或ss命令都可以1)统计连接数(80端口)[root@wang ~]# netstat -nat|grep -i "80"|wc -l872 或者 ...