Getting the specific attribute that is throwing a Fault Exception?

問題 Getting the specific attribute that is throwing a Fault Exception?

  • Wednesday, August 15, 2012 9:33 PM
     
     

    I am having a problem handling a specific exception being thrown on a create() call in a ASP.NET application that talks to CRM 2011.  I am not able to attach a debugger to the web instance, so it's hard to step through the error in the debugger.

    Is there any way of getting the name of the bad attribute from a FaultException? Right now i am capturing the following exception. 

    catch (FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault> fe)

    Which is giving me the following Message: 

    "Incorrect attribute value type System.String"

    Is there anyway of retrieving the name of the attribute that is throwing this exception? 

    fe.Detail.trace isn't telling me anything,  fe.Detail.InnerFault is null, so nothing there.

All Replies

  • Friday, August 17, 2012 1:52 PM
     
     
    Have you tried the Failed Request Tracing in the IIS or the Event Log on the CRM server?
  • Friday, August 17, 2012 3:59 PM
     
     
    It's CRM online, and i only have FTP access to the IIS server. 
  • Saturday, August 18, 2012 2:37 PM
     
     

    hi nathan can u post ur code so that u can identify exact problem in ur code

    if ur retrieve the data may be the field doesnt exist in the entity

    vch method ur using queryexpression or linq to retrive the data


    ms crm