1

When I try to deploy by Worker to Azure, I get the following exception:

Application: WaWorkerHost.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironmentException Stack: at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.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()

Can someone please help me solve this?

UPDATE:

I managed to get more information about the exception:

Process ID: 3320 Process Name: WaWorkerHost Thread ID: 4 AppDomain Unhandled Exception for role XYZ.Worker_IN_0 Exception: error at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName)

COBOL
  • 1,031
  • 8
  • 16
  • 32

1 Answers1

2

As @sharptooth pointed out, this can happen if you try to read a setting using:

CloudConfigurationManager.GetSetting("settingname") 

Where there is no setting called "settingname" in your ServiceConfiguration.[Cloud].csdef file. To find out which setting is not found, run the worker in the debugger from Visual Studio with first-chance exceptions enabled.

Note that when running the worker locally in the debugger, you should check ServiceConfiguration.Local.cscfg for the setting.

Mr. Bungle
  • 1,696
  • 17
  • 21