我正在開發一個Windows服務,它使用service.create()
方法讀取CSV文件並將記錄添加到Dynamics CRM 2011。它拋出以下異常,我一直無法確定原因:連接到Dynamics CRM拋出「請求被中止:請求被取消。」異常
Exception Message: The request was aborted: The request was canceled.
Inner Exception:
Date Time: 3/14/2016 1:15:56 PM
Stack Trace: at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.Xml.XmlTextWriter.Flush()
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at myServ.CrmSdk.CrmService.Execute(Request Request)
at myServ.myServ.DeleteReceiptsByRecpDate(DateTime dtToday, String AbcAgency, CrmService service)
at myServ.myServ.timer1_Elapsed(Object sender, ElapsedEventArgs e)
你可以發佈你的代碼嗎?只有例外可能不足以解決問題。 – JanR