2013-10-15 49 views
0

我遇到了一些尝试部署Web角色的主要问题。 经过约30分钟的门户网站不断告诉我部署Azure Webrole开始受阻

忙(起的作用......站点部署。[2013-10-15T05:54:43Z])

如果我实际访问网站我可以访问它,但是我不舒服,在Azure门户中显示的消息一切正常。

我检查过的dll都是复制本地的。 我已经更新了的web.config

<dependentAssembly> 
    <assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" /> 
    </dependentAssembly> 

我觉得我的服务DEF是确定

<ServiceDefinition name="My.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-03.2.0"> 
<WebRole name="My.WebApplication" vmsize="Small"> 
<Sites> 
    <Site name="Web"> 
    <!--<VirtualApplication name="API" physicalDirectory="_PublishedWebsites\Api"/>--> 
    <Bindings> 
     <Binding name="HttpsIn" endpointName="HttpsIn"/> 
    </Bindings> 
    </Site> 
</Sites> 
<Endpoints> 
<InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="CoolCert"/> 
</Endpoints> 
<Imports> 
    <Import moduleName="Diagnostics" /> 
    <Import moduleName="RemoteAccess" /> 
    <Import moduleName="RemoteForwarder" /> 
</Imports> 
<Certificates> 
    <Certificate name="CoolCert" storeLocation="LocalMachine" storeName="CA" /> 
</Certificates> 

我WebRole

public class WebRole : RoleEntryPoint 
{ 
    public override bool OnStart() 
    { 

     if (!Trace.Listeners.OfType<DiagnosticMonitorTraceListener>().Any()) 
     { 
      Trace.Listeners.Add(new DiagnosticMonitorTraceListener()); 
     } 
     AppDomain.CurrentDomain.UnhandledException += UnhandledExpectionEventHandler; 

     Trace.TraceInformation("Started" + DateTime.Now); 
     return base.OnStart(); 
    } 

    private void UnhandledExpectionEventHandler(object sender, UnhandledExceptionEventArgs e) 
    { 
     var ex = e.ExceptionObject as Exception; 
     var baseEx = ex.GetBaseException(); 
     Trace.TraceError(baseEx.Message+"\n"+baseEx.StackTrace); 
    } 
} 

我已经采取了看看事件查看器在服务器上,没有什么是跳出来对我。

有此错误

从源追踪日志探查事件ID 8的描述不能被发现。引发此事件的组件未安装在本地计算机上或安装已损坏。您可以在本地计算机上安装或修复组件。

If the event originated on another computer, the display information had to be saved with  the event. 

The following information was included with the event: 

w3wp.exe 
DumpObject 

有人能看到什么毛病从上面或暗示别的东西,我可以试试。

回答

0

看起来像你正在使用痕迹。你确定跟踪是否开始,以便创建错误表? 下面的代码是我用什么,在这里工作好

// Set the maximum number of concurrent connections 
ServicePointManager.DefaultConnectionLimit = 12; 

//Diag kick start 
System.Diagnostics.Trace.Listeners.Add(new Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener()); 
var config = DiagnosticMonitor.GetDefaultInitialConfiguration(); 
DiagnosticMonitorTraceListener tmp = new DiagnosticMonitorTraceListener(); 
System.Diagnostics.Trace.Listeners.Add(tmp); 
config.Logs.BufferQuotaInMB = 200; 
config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1.0); 
DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", config); 
System.Diagnostics.Trace.Write("Test");