ServiceBus WorkerRole DiagnosticMonitor Error

Posted by user1596485 on Stack Overflow See other posts from Stack Overflow or by user1596485
Published on 2012-09-28T01:13:53Z Indexed on 2012/09/28 3:38 UTC
Read the original article Hit count: 229

Filed under:
|

I have a WebRole and 2 ServiceBus WorkerRoles running, During the OnStart of the roles I get the following Exception: [System.ArgumentOutOfRangeException] invalid syntax for container log4net Parameter name: initialConfiguration

Running Azure:  
ConfigurationManager version=1.7.0.3  
ServiceBus version=1.7.0.1  
Storage version=1.7.0.0  

This occurs while running locally in the dev Azure environment and in the Cloud.

All roles have the following Configurtion settings:  
<LocalStorage name="Log4Net" cleanOnRoleRecycle="true" sizeInMB="2048" />    

All Roles have the following code in the OnStart:

try
{
     // Configure Disgnostics to poll Log file to Blob Storage
     var diagnosticsConfig = DiagnosticMonitor.GetDefaultInitialConfiguration();
     diagnosticsConfig.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(5);
     diagnosticsConfig.Directories.DataSources.Add(
         new DirectoryConfiguration
             {
                 Path = RoleEnvironment.GetLocalResource("Log4Net").RootPath,
                 DirectoryQuotaInMB = 512,
                 Container = "wad-WebRolelog4net"
             });
     DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagnosticsConfig);  
}
catch
{
        OnStop();
        return false;
}

© Stack Overflow or respective owner

Related posts about Azure

Related posts about azure-storage