Question

I'm trying to test the Azue diagnostic monitor in a cloud solution with a single asp.net application.

I get an exception every time I try to start the diagnostics monitor:

        CloudStorageAccount account = CloudStorageAccount.Parse("UseDevelopmentStorage=true");

        Write(account.TableEndpoint.AbsoluteUri);

        // Get default initial configuration.
        var config = DiagnosticMonitor.GetDefaultInitialConfiguration();

        config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Undefined;
        config.Logs.ScheduledTransferPeriod = TimeSpan.FromSeconds(5);

        // Start the diagnostic monitor with the modified configuration.
        DiagnosticMonitor.Start(account, config); // Exception

The exception says:

System.ArgumentException was unhandled by user code
  Message=Directory C:\Users\Me\Documents\Visual Studio 2010\Projects\CloudDebuggingTest\CloudDebuggingTest\bin\Debug\CloudDebuggingTest.csx\roles\CloudDebuggingTest.Web\diagnostics\x64\monitor does not exist.
  Source=Microsoft.WindowsAzure.Diagnostics
  StackTrace:
       at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.ValidateStartupInfo(DiagnosticMonitorStartupInfo startupInfo) in :line 0
       at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.StartWithExplicitConfiguration(DiagnosticMonitorStartupInfo startupInfo, DiagnosticMonitorConfiguration initialConfiguration) in :line 0
       at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.Start(CloudStorageAccount storageAccount, DiagnosticMonitorConfiguration initialConfiguration) in :line 0
       at CloudDebuggingTest.Web._Default.StartDiagnostics() in C:\Users\Me\Documents\Visual Studio 2010\Projects\CloudDebuggingTest\CloudDebuggingTest.Web\Default.aspx.cs:line 48
       at CloudDebuggingTest.Web._Default.Page_Load(Object sender, EventArgs e) in C:\Users\Me\Documents\Visual Studio 2010\Projects\CloudDebuggingTest\CloudDebuggingTest.Web\Default.aspx.cs:line 19
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException: 

I have no idea about what am I missing, I've been checking out some links and they do exactly this. Any idea?

Cheers.

Was it helpful?

Solution

This has to be kidding me :|

The problem is that the path is too long, I moved the project to D:\ and then it's working fine @.@

I found the solution by chance, when I step into an article talking about limitations in path length.

http://markegilbert.wordpress.com/2010/11/05/i-just-hit-my-head-on-a-cloud-microsoft-azure-and-full-path-limits/

I hit my head too :(

OTHER TIPS

I'm not sure about this particular problem.

However, one thing that might help, is that it's unusual to start the Diagnostics in Page_Load - it's much more typical to start in the Role Start method.

Also, I would not recommend using a period as short as 5 seconds for transferring your log files - an hour or more is normally more suitable (although I understand that this setting is just there at the moment to help with your testing!)

I found Running the project under IISExpress and not IIS Web Server fixed this problem for me. To change this go the properties on the Azure Project and got to the Web Tab, you can change this setting.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top