{"id":30749,"date":"2022-02-23T16:23:23","date_gmt":"2022-02-23T10:53:23","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=30749"},"modified":"2022-02-23T16:23:23","modified_gmt":"2022-02-23T10:53:23","slug":"error-faced-while-registering-plugin-in-on-premise-crm","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2022\/02\/error-faced-while-registering-plugin-in-on-premise-crm\/","title":{"rendered":"Error Faced while registering Plugin in On-premise CRM"},"content":{"rendered":"<h2 style=\"text-align: justify;\"><strong>Introduction:<\/strong><\/h2>\n<p style=\"text-align: justify;\">In Dynamics 365 CRM, plugin is the most useful component to implement custom business logic. Plugin is the most used feature of Dynamics 365 CRM. Recently, a client requested us to add their functional requirement in Dynamics 365 CRM, so we developed a plugin to fulfill these requirements. But when we tried to register the plugin using the plugin registration tool we got the below error due to which we were not able to register the plugin. We tried to install the plugin through solution but even then we got the same error.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-1.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-30750 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-1.png\" alt=\"Plugin register error in on-premise\" width=\"803\" height=\"604\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-1.png 803w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-1-300x226.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-1-768x578.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-1-660x496.png 660w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Given below is the trace log that we got.<\/p>\n<p><em>Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot open Sql Encryption Symmetric Key because Symmetric Key password does not exist in Config DB.<\/em><\/p>\n<p><em>Detail: &lt;OrganizationServiceFault xmlns=&#8221;http:\/\/schemas.microsoft.com\/xrm\/2011\/Contracts&#8221; xmlns:i=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221;&gt;<\/em><\/p>\n<p><em>\u00a0 &lt;ActivityId&gt;557910eb-7a5f-434a-b7ea-d7e85962d046&lt;\/ActivityId&gt;<\/em><\/p>\n<p><em>\u00a0 &lt;ErrorCode&gt;-2147187410&lt;\/ErrorCode&gt;<\/em><\/p>\n<p><em>\u00a0 &lt;ErrorDetails xmlns:a=&#8221;http:\/\/schemas.datacontract.org\/2004\/07\/System.Collections.Generic&#8221;&gt;<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0 &lt;KeyValuePairOfstringanyType&gt;<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;a:key&gt;ApiExceptionSourceKey&lt;\/a:key&gt;<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;a:value i:type=&#8221;b:string&#8221; xmlns:b=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema&#8221;&gt;Plugin\/Microsoft.Crm.ObjectModel.PluginAssemblyService&lt;\/a:value&gt;<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0 &lt;\/KeyValuePairOfstringanyType&gt;<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0 &lt;KeyValuePairOfstringanyType&gt;<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;a:key&gt;ApiOriginalExceptionKey&lt;\/a:key&gt;<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;a:value i:type=&#8221;b:string&#8221; xmlns:b=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema&#8221;&gt;Microsoft.Crm.CrmException: Cannot open Sql Encryption Symmetric Key because Symmetric Key password does not exist in Config DB. &#8212;&amp;gt; Microsoft.Crm.CrmException: Cannot open Sql Encryption Symmetric Key because Symmetric Key password does not exist in Config DB.<\/em><\/p>\n<p><em>\u00a0\u00a0 at Microsoft.Crm.Query.SymmetricKeyPasswordRetriever.RetrievePassword(Guid organizationId)<\/em><\/p>\n<p><em>\u00a0\u00a0 at Microsoft.Crm.Query.ServerQuerySqlCellLevelEncryption.AddOpenEncryptionChainCommand(StringBuilder sqlString, Guid organizationId)<\/em><\/p>\n<p><em>\u00a0 \u00a0at Microsoft.Crm.Query.CrmSqlSelectCommandStrategy.AddOpenEncryptionChainCommand(StringBuilder sqlValue)<\/em><\/p>\n<p><em>\u00a0\u00a0 at Microsoft.Crm.Query.CrmSqlSelectCommandStrategy.WritePreSelectCommandComponents(StringBuilder sqlString)<\/em><\/p>\n<p><em>\u00a0\u00a0 at Microsoft.Crm.Query.CrmSqlSelectCommandStrategy.GetCommandString(Boolean writeOutPreAndPostSelectComponents)<\/em><\/p>\n<p><em>\u00a0\u00a0 at Microsoft.Crm.Query.SelectPlan.&amp;lt;GetSql&amp;gt;b__3_0()<\/em><\/p>\n<p style=\"text-align: justify;\">After troubleshooting the error, we found the cause and thereby the solution to resolve it.<\/p>\n<p style=\"text-align: justify;\">We found that this issue occurred because the \u201cEncryption key\u201d was not created in this CRM. When we go to Data Encryption to create the Encryption key then it throws the below error.<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"size-full wp-image-30751 aligncenter\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-2.png\" alt=\"Plugin register error in on-premise 2\" width=\"952\" height=\"516\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-2.png 952w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-2-300x163.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-2-768x416.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-2-660x358.png 660w\" sizes=\"(max-width: 952px) 100vw, 952px\" \/><\/p>\n<p style=\"text-align: justify;\">To resolve the above error, we have to execute the below query in SQL database.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-3.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-30752 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-3.png\" alt=\"Plugin register error in on-premise\" width=\"498\" height=\"216\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-3.png 498w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-3-300x130.png 300w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">After we execute the query, we can go to Data encryption and create the Encryption key as shown below:<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-4.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-30753 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-4.png\" alt=\"Plugin register error in on-premise\" width=\"924\" height=\"527\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-4.png 924w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-4-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-4-768x438.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/02\/Plugin-register-error-in-on-premise-4-660x376.png 660w\" sizes=\"(max-width: 924px) 100vw, 924px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">After we create the encryption key we will be able to register the plugin successfully.<\/p>\n<h2 style=\"text-align: justify;\"><strong>Conclusion:<\/strong><\/h2>\n<p style=\"text-align: justify;\">As illustrated above, to register some plugins in On-premise it is necessary to create Encryption key in Dynamics 365 CRM.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/kanban-board-dynamics-365-crm\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"wp-image-29679 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/10\/1.jpg\" alt=\"\" width=\"800\" height=\"200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/10\/1.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/10\/1-300x75.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/10\/1-768x192.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2021\/10\/1-660x165.jpg 660w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In Dynamics 365 CRM, plugin is the most useful component to implement custom business logic. Plugin is the most used feature of Dynamics 365 CRM. Recently, a client requested us to add their functional requirement in Dynamics 365 CRM, so we developed a plugin to fulfill these requirements. But when we tried to register\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2022\/02\/error-faced-while-registering-plugin-in-on-premise-crm\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,19,2361],"tags":[2561],"class_list":["post-30749","post","type-post","status-publish","format-standard","hentry","category-dynamics-365","category-dynamics-crm","category-technical","tag-on-premise-crm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/30749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=30749"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/30749\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=30749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=30749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=30749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}