Answered by:
Problem using CRM 2011 SDK

Question
-
Hi,
I am using CRM 2011 online. I'm looking to be able to access the data using Web Services.
I have installed Microsoft Dynamics CRM SDK and when I run the quickstart program I get the following exception:
I am using Visual Studio 2010 Express.
Any suggestions?
Thanks in advance,
Corun
- Moved by Andrii ButenkoMVP, Moderator Monday, August 22, 2011 9:05 AM (From:CRM)
Friday, August 19, 2011 4:11 PM
Answers
-
You *must* have that folder somewhere, otherwise you will not be able to connect to CRM Online. The problem you are seeing is because the XML on that folder needs to be regenerated. You have to find your user profile directory andf you will find the folder in that directory. CRM will use the following code to find the folder:public static readonly string LiveDeviceFileNameFormat = Path.Combine(
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "LiveDeviceID"),
"LiveDevice{0}.xml");Gonzalo | gonzaloruizcrm.blogspot.com
- Proposed as answer by Gonzalo Ruiz RModerator Monday, August 22, 2011 12:37 PM
- Marked as answer by CorunJohnson Monday, August 22, 2011 1:30 PM
Monday, August 22, 2011 12:36 PMModerator
All replies
-
I had the same problem and this fixed it for me:
Go to C:\Users\<username>\LiveDeviceId
and delete the files inside the folder, they will get re-generated properly.
I hope that solves your problem.
Gonzalo | gonzaloruizcrm.blogspot.com
- Proposed as answer by Gonzalo Ruiz RModerator Friday, August 19, 2011 4:13 PM
Friday, August 19, 2011 4:13 PMModerator -
If Gonzalo's suggestion doesn't work, try catching the Cryptographic Exception and posting in the forum the contents of the ex.ToString() to see if it makes more sense as to what is going on.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Friday, August 19, 2011 4:26 PMModerator -
Hi,I don't seem to have a LiveDeviceId folder. What process creates this?Here's the error message in full:"System.Security.Cryptography.CryptographicException: The parameter is incorrect.\r\n\r\n at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)\r\n at Microsoft.Crm.Services.Utility.DeviceUserName.Decrypt(String value) in C:\\Users\\admin\\Desktop\\CRM Dynamics Development\\Microsoft Dynamics CRM 2011 SDK\\samplecode\\cs\\HelperCode\\DeviceIdManager.cs:line 878"Thanks,CorunMonday, August 22, 2011 8:06 AM
-
I ran into this problem once a long time ago and I didn't have that folder either. Check to make sure your date/time/timezone settings are correct on both your server and your client. I am trying to remember if that was the specific issue related to the that problem or not since it has been so long.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Monday, August 22, 2011 11:05 AMModerator -
I'm using CRM 2011 Online so not sure how I would check that?Monday, August 22, 2011 11:54 AM
-
You *must* have that folder somewhere, otherwise you will not be able to connect to CRM Online. The problem you are seeing is because the XML on that folder needs to be regenerated. You have to find your user profile directory andf you will find the folder in that directory. CRM will use the following code to find the folder:public static readonly string LiveDeviceFileNameFormat = Path.Combine(
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "LiveDeviceID"),
"LiveDevice{0}.xml");Gonzalo | gonzaloruizcrm.blogspot.com
- Proposed as answer by Gonzalo Ruiz RModerator Monday, August 22, 2011 12:37 PM
- Marked as answer by CorunJohnson Monday, August 22, 2011 1:30 PM
Monday, August 22, 2011 12:36 PMModerator -
Sorry I was being an idiot!
Found the LiveDeviceID folder and deleted the xml file as per Gonzalo's recommendation.
All working fine now.
Thanks everyone!
Monday, August 22, 2011 1:30 PM