The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception

后端 未结 3 1178
忘了有多久
忘了有多久 2020-12-17 01:55

I am trying to use Windows Azure Caching to store sessions in a MVC4 application. I build a application following steps from Link but when i try to make object of DataCache

3条回答
  •  太阳男子
    2020-12-17 02:12

    I experienced this when migrating from Azure SDK 2.3 to SDK 2.4.

    I noticed the migration automatically fixed all references to the service runtime for my web and worker roles, i.e.

    C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\v2.3\ref\Microsoft.WindowsAzure.ServiceRuntime.dll
    

    changed to:

    C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.4\ref\Microsoft.WindowsAzure.ServiceRuntime.dll
    

    However any assemblies referenced from the web/worker roles that referenced this assembly didn't update so I had to do it manually.

    In addition I had to update the web.config and app.config entries to reference 2.4.0.0

    
        
         
    
    

提交回复
热议问题