2
votes

I have a Worker Role in my Azure Cloud Service. The worker role is not starting and some exception is being thrown. I am not seeing any issue in the local emulator. I am getting a message like 'Unhandled Exception: System.AggregateException, Details: Exception: One or more errors occurred. at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task)' in the management portal. It looks like that the error is happening when RoleStart is being called.
How can I get the detail stacktrace of the error?

2
There are many potential causes for crashing on RoleStart. The article is very useful and covers troubleshooting in most scenarios: blogs.msdn.microsoft.com/kwill/2013/08/09/… - Roman Oleynik

2 Answers

3
votes

You can turn on remote debugging for your work role and get more detialed information, check this blog for how to turn on remote debugging.

If you meet any problem, please take a look at this thread for troubleshooting.

1
votes

The error was actually related to a DLL version mismatch. One of the projects in my solution was referring to Windows Azure Storage SDK version 6.0.4 which the worker role was reffering to 7.0.0.0. For some reason this error was not getting reproduced while debugging in local. On further investigation I found a few more such DLLs which had to upgraded and consolidated across the whole project. Not sure as to why I couldn't reproduce the same error in my local.