I have custome azure utility dll that has one method to read configuration values from ServiceConfiguration
and also has fallback code to read from AppSettings
from web.config
in case RoleEntironment
is not running .
This DLLs works fine with Azure WCF project runnning on local and production cloud environment.
For some reason I am hosting this WCF service on Rackspace server on IIS.
On my local machine IIS, WCF service works fine but on Rackspace it crashes with following error:
The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception.
I have copied WindowsAzure.ServiceRuntime.dll
, Diagnostics.dll
and StorageClient.dll
in bin on rackspace. Still it gives same error.
I have also tried copying <startup useLegacyV2RuntimeActivationPolicy="true">
to Web.config
, still it does not work.
Any idea? Am I missing more cloud DLLs or some more configuration is needed?