I'm trying like crazy to figure out what is going wrong in WebRole.OnStart()
. I know where the issue is occurring. I just don't know what the issue is.
I have added the following to web.config:
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,
Microsoft.WindowsAzure.Diagnostics,
Version=2.4.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
I have also added the following to WebRole.OnStart()
Trace.TraceInformation("OnStart()");
try
{
CallMethodThatCausesException();
}
catch (Exception ex)
{
Trace.TraceError("Exception: " + ex.ToLogString());
throw;
}
I have also set a custom plan in the WebRole Diagnostics:
However, I can't find any log files, tables in TableStorage
, or blobs in BlobContainers
that contain either of the Trace
statements above.
I do see WADLogsTable
but The only entries that I see are Loaded "Microsoft.WindowsAzure.ServiceRuntime, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
.
Within the event logs I do see an exception:
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException
Stack:
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
Any help would be greatly appreciated!