Unable to Find Assembly 'Microsoft.IdentityModel' When RoleEnvironmentAPIs are Called
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=18.104.22.168, 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.
For more information on using startup tasks, see Run Startup Tasks in Windows Azure.