Windows Azure and type initializer for 'System.ServiceModel.Diagnostics.TraceUtility' threw an Exception
I've been working on a new product that I'm with Windows Azure and today whilst I came to debug a WCF service within it stumbled apon an error that at first glance doesn't make a whole lot of sence, but with a bit of working backwards turns out is quite simple to fix. The scenario: I have a WCF service setup to run in a WorkerRole as part of an Azure solution, pretty simple. To enable me to see what was going on clearer with my service i decided to configure my system.diagnostic listeners and added the default AzureLocalStorage listener, which is created automatically for you, to my service model and message logging. <system.diagnostics> <sharedListeners> <add name="AzureLocalStorage" type="ServiceAuthenticationGatewayWorkerRole.AzureLocalStorageTraceListener, ServiceAuthenticationGatewayWorkerRole"/> </sharedListeners> <sources> ...