I have hosted a asp.net website on Windows Azure and trying to connect to Microsoft Dynamics CRM 2011 Online. But I am getting below error:
The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.
Error Source = at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) at Microsoft.Crm.Services.Utility.DeviceUserName.Encrypt(String value) in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 869 at Microsoft.Crm.Services.Utility.DeviceUserName.UpdateCredentials(String encryptedValue, String decryptedValue) in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 840 at Microsoft.Crm.Services.Utility.DeviceUserName.set_DecryptedPassword(String value) in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 796 at Microsoft.Crm.Services.Utility.DeviceIdManager.GenerateDeviceUserName() in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 390 at Microsoft.Crm.Services.Utility.DeviceIdManager.RegisterDevice(Guid applicationId, Uri issuerUri, String deviceName, String devicePassword) in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 185 at Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice(Uri issuerUri, String deviceName, String devicePassword) in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 109 at Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice(Uri issuerUri) in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 92 at Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice() in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\DeviceidManager.cs:line 70 at ServerConnection.ConnectToCRM() in c:\DWASFiles\sites\mfs\VirtualDirectory0\site\wwwroot\App_Code\CrmService.cs:line 56
Can someone help me on this?
Thanks Chandrabhanu