1
votes

I have exported the plugins from prod server, and getting the following error message when importing into the test server.

Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request.

Detail:

0x80040237

Cannot insert duplicate key.

Platform

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at PluginRegistrationTool.CrmSdk.CrmService.Create(BusinessEntity entity)

at PluginRegistrationTool.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)

at PluginRegistrationTool.ImportExport.ImportSolution(CrmOrganization org, ICollection1 assemblies, ICollection1 checkedTreeNodes, IDictionary`2 pathList)

at PluginRegistrationTool.ImportExportForm.btnExecute_Click(Object sender, EventArgs e)

2

2 Answers

0
votes

On your test server check if plugins/steps/images by the same name are already existing. If yes, then delete them first before attempting the import.

I would recommend that you delete all registered plungins first before attempting to import.

0
votes

enter image description hereWhen you create a new plugin Visual Studio will automatically create the step/class name for you based on the Pipeline Stage (Pre-Validation, Pre-Operation, Post-Operation) the Primary Entity (Contact, Organization) and the Message (Create, Update, etc) For example, PostContactUpdate or PreOrganizationUpdate, so if you happen to be making another plugin with same message, pipeline stage and primary entity and you accepted the default class names that could explain why you are getting the error. Changing the class name and redeploying should fix it for you.