Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 9244

CRM 2011: Solution Import 'An unexpected error occurred.'

$
0
0

When i try to import a solution file in C# exe console application, i get :

An unexpected error occurred.

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRunt
ime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
eout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
Message methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

After i recycle the app pool and manually import a solution file, then my code works.

I am using:

Microsoft.Crm.Sdk.dll 5.0.9690.3218

Microsoft.Xrm.Sdk.dll 5.9.9900.1010

I suspect an older version of one of these dlls is cached in CRMAppPool, and is not able to processImportSolutionRequest .

Is there a way explicitly use only the new dll, or clear out the older version in code somehow?

                byte[] fileBytes = File.ReadAllBytes(SolutionZipFile);
                ImportSolutionRequest impSolReq = new ImportSolutionRequest()
                {
                    CustomizationFile = fileBytes,
                    ImportJobId = Guid.NewGuid()
                };
                orgService.Execute(impSolReq);


Viewing all articles
Browse latest Browse all 9244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>