1
votes

Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral.

I am trying to call:

var objStorage = CloudStorageAccount.FromConfigurationSetting("BlobStorage"); 

in my Mvc action, where in I have placed,

CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSettingPublisher) =>
        { var connectionString = RoleEnvironment.GetConfigurationSettingValue(configName);
            configSettingPublisher(connectionString);
        }
        );   

in my

protected void Application_Start() 

in global.asax.cs File .

note:am using Windows Identity Foundation SDKv4.0,Windows azure SDK - nov 2011 & my application uses ADFS

i have tried resolving this error using the blog post http://blogs.infosupport.com/adding-assemblies-to-the-gac-in-windows-azure/. But none wrked out for me! help me out on this...

1

1 Answers

1
votes

This is a known issue.

From: http://msdn.microsoft.com/en-us/library/windowsazure/hh403974.aspx

Updated: September 4, 2011

Applies to: Applies to SDK1.3 and later using a full IIS web role and Windows Identity Foundation.

Symptom: You encounter the following exception on the first call to a RoleEnvironment method.

[SerializationException: Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]

Cause: The Windows Identity Foundation assemblies are not properly installed to the Windows Azure virtual machine.

Resolution: Use a startup task to reinstall the Windows Identity Foundation package on the virtual machine.