locked
Plugin Registration Issue RRS feed

  • Question

  • I am trying to register a plugin but fail at even making a connection. I have no issues doing this with our CRM 4.0 Online (v2.1). However, it doesn't work for my CRM Online 2011 trial account. Note that this is my second trial account associated with the same email address. The plugin registration tool is v5.0.6.0. For the discovery url I am using https://dev.crm.dynamics.com. For the user name I use the email address I use to log into the trial account. Could it be that it tries to use my previous trial account? If so how do I specify which one to use? Here is the trace:

    Unhandled Exception: System.InvalidOperationException: There is an error in XML document (5, 5).
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
       at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
       at Microsoft.Crm.Services.Utility.DeviceIdManager.Deserialize[T](Stream stream) in E:\sdk\sdk\SampleCode\CS\HelperCode\DeviceIdManager.cs:line 275
       at Microsoft.Crm.Services.Utility.DeviceIdManager.ReadExistingDevice(String environment) in E:\sdk\sdk\SampleCode\CS\HelperCode\DeviceIdManager.cs:line 326
       at Microsoft.Crm.Services.Utility.DeviceIdManager.LoadDeviceCredentials(Uri issuerUri) in E:\sdk\sdk\SampleCode\CS\HelperCode\DeviceIdManager.cs:line 221
       at Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice(Uri issuerUri, String deviceName, String devicePassword) in E:\sdk\sdk\SampleCode\CS\HelperCode\DeviceIdManager.cs:line 105
       at Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice(Uri issuerUri) in E:\sdk\sdk\SampleCode\CS\HelperCode\DeviceIdManager.cs:line 91
       at PluginRegistrationTool.AutoRefreshSecurityToken`2.AuthenticateDevice() in E:\sdk\sdk\tools\pluginregistration\AutoRefreshSecurityToken.cs:line 84
       at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.AuthenticateDeviceCore() in E:\sdk\sdk\tools\pluginregistration\ToolServiceProxies.cs:line 41
       at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.AuthenticateCore()
       at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.AuthenticateCore() in E:\sdk\sdk\tools\pluginregistration\ToolServiceProxies.cs:line 47
       at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.Authenticate()
       at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.ValidateAuthentication()
       at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.ValidateAuthentication() in E:\sdk\sdk\tools\pluginregistration\ToolServiceProxies.cs:line 53
       at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1.Initialize(ServiceProxy`1 proxy)
       at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
       at PluginRegistrationTool.CrmConnection.RetrieveOrganizations() in E:\sdk\sdk\tools\pluginregistration\CrmConnection.cs:line 315
       at PluginRegistrationTool.ConnectionsForm.OpenConnection(CrmConnection con) in E:\sdk\sdk\tools\pluginregistration\ConnectionsForm.cs:line 940
    Inner Exception: System.Security.Cryptography.CryptographicException: The parameter is incorrect.

       at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
       at Microsoft.Crm.Services.Utility.DeviceUserName.Decrypt(String value) in E:\sdk\sdk\SampleCode\CS\HelperCode\DeviceIdManager.cs:line 879
       at Microsoft.Crm.Services.Utility.DeviceUserName.UpdateCredentials(String encryptedValue, String decryptedValue) in E:\sdk\sdk\SampleCode\CS\HelperCode\DeviceIdManager.cs:line 850
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderLiveDevice.Read2_DeviceUserName(Boolean isNullable, Boolean checkType)
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderLiveDevice.Read3_LiveDevice(Boolean isNullable, Boolean checkType)
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderLiveDevice.Read4_Data()

     

    Monday, November 21, 2011 7:40 AM

Answers

  • In the discovery url try https://orgname.crm.dynamics.com...

    Also make sure your system is not backdated. And if you find a file LiveID.xml in C:\users\<username>\LiveDeviceId delete that and retry.

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Edited by Sam - Inogic Monday, November 21, 2011 9:35 AM
    • Proposed as answer by Sam - Inogic Monday, November 21, 2011 9:36 AM
    • Marked as answer by hfaun Tuesday, November 22, 2011 7:19 AM
    Monday, November 21, 2011 9:34 AM

All replies

  • In the discovery url try https://orgname.crm.dynamics.com...

    Also make sure your system is not backdated. And if you find a file LiveID.xml in C:\users\<username>\LiveDeviceId delete that and retry.

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Edited by Sam - Inogic Monday, November 21, 2011 9:35 AM
    • Proposed as answer by Sam - Inogic Monday, November 21, 2011 9:36 AM
    • Marked as answer by hfaun Tuesday, November 22, 2011 7:19 AM
    Monday, November 21, 2011 9:34 AM
  • https://orgname.crm.dynamics.com is actually what I tried first. There wasn't any LiveID.xml file but a LiveDevice.xml file. After deleting the LiveDevice.xml file it worked with the aformentioned URL. Thanks!! Maybe MS should consider adding this not very obvious tip in their error message of the registration tool.

    Tuesday, November 22, 2011 6:56 AM