Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

How to get proper error Message, thown by IOrganizationService

$
0
0

Hi,

I am using IOrganizationService to import solution in CRM 2013 and i want to catch all exception related to IOrganizationService.

I am getting error  Message from below code is - "Solution manifest import: FAILURE".

But if i debug the code through "Quick Watch" i get error Message - "The following solution cannot be imported: CRMDeployTest. Some dependencies are missing." and expression is - ((ex.Detail.InnerServiceFault).InnerServiceFault).Message.  and i am not able to use this expression in my code.

Is there any way to get above error message or any detailed error message by other way which suggest which entity we requiered to import this solution successfully.

My exception code is as below:

catch (FaultException<OrganizationServiceFault> ex)
{
Console.WriteLine("The application terminated with an error.");
Console.WriteLine("Timestamp: {0}", ex.Detail.Timestamp);
Console.WriteLine("Code: {0}", ex.Detail.ErrorCode);
Console.WriteLine("Message: {0}", ex.Detail.Message);
Console.WriteLine("Plugin Trace: {0}", ex.Detail.TraceText);
Console.WriteLine("Inner Fault: {0}",
null == ex.Detail.InnerFault ? "No Inner Fault" : "Has Inner Fault");

//Console.WriteLine(((ex.Detail.InnerServiceFault).InnerServiceFault).Message);
Console.WriteLine(ex.Detail.Message);
throw ex;
}


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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