Windows Azure and type initializer for 'System.ServiceModel.Diagnostics.TraceUtility' threw an Exception
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDi86k-bZom4JUPFI-eaA1E0i-HKUQeTmu0O3kV3lAS6N5MqMEX5Rw2cPgq0i-TvyncM7x-IdXDes5YMuD89UsosCQTyWgQ0cMAOU8UWQw45WhcitDCYLj8SAfpnDUycaTLYlhVW14WP4/s320/AzureTypeInitializationException.png)
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> <source name="System.ServiceModel" switchValue=&q