【问题标题】:SaveChangesException was unhandled "An error occured while processing this request."SaveChanges 异常未处理“处理此请求时发生错误。”
【发布时间】:2012-01-20 14:20:12
【问题描述】:

我正在使用早期绑定的类,在调用 SaveChanges() 时,我收到了这个通用错误消息,它什么也没告诉我。

内部异常是“发生了意外错误”

服务器的跟踪已打开,只是重新发布相同的错误消息。

有什么方法可以从中获取有用的信息吗?

谢谢

【问题讨论】:

  • 你能贴出导致异常的代码吗?

标签: c# wcf dynamics-crm dynamics-crm-2011


【解决方案1】:

尝试在配置文件中打开 customErrors。

【讨论】:

    【解决方案2】:

    尝试将您的代码包装在:

            try
            {
                //crm code here
            }
            // Catch any service fault exceptions that Microsoft Dynamics CRM throws.
            catch (FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>)
            {
                // You can handle an exception here or pass it back to the calling method.
                throw;
            }
    

    如果您捕获到抛出的特定异常,它可能会更清楚地说明问题。如果做不到这一点,请将代码发布/在新问题中提出,我们可能会提供进一步的帮助。

    【讨论】:

      【解决方案3】:

      soap 异常中有一个详细信息部分,这通常包括一些有助于解决您的问题的附加详细信息。

      try
      {
          response = crm.Execute(request);
      }
      catch (SoapException e)
      {
          //Console.Write(e.Detail.InnerXml);
          throw new Exception (e.Detail.InnerXml, e);
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-12-26
        • 1970-01-01
        • 2021-08-01
        • 1970-01-01
        • 1970-01-01
        • 2020-11-14
        • 2021-02-20
        • 1970-01-01
        相关资源
        最近更新 更多