XML 응답을 얻으려고하는 플러그인을 작성했습니다. 이 내 코드입니다 : 자사의 콘솔 응용 프로그램으로 작성된 경우HttpWebRequest.GetRequestStream()이 MS Dynamics CRM Plugin에서 작동하지 않습니다.
// Set the Method property of the request to POST.
string strXMLServer = "xxx";
var request = (HttpWebRequest)WebRequest.Create(strXMLServer);
request.Method = "POST";
// Set the ContentType property of the WebRequest.
request.ContentType = "xyz";
// Assuming XML is stored in strXML
byte[] byteArray = Encoding.UTF8.GetBytes(strXML);
// Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length;
//(LINE 5) Get the request stream
Stream dataStream = request.GetRequestStream();
// Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length);
// Close the Stream object.
dataStream.Close();
이 코드는 잘 작동합니다. 내가 클래스 라이브러리 (플러그인) 같은 코드를 복사하여 플러그인 프로파일 러를 사용하여 디버깅하려고 할 때, 응용 프로그램이 갑자기 중단 도착이 도달하면 (LINE 5) 즉 Stream dataStream = request.GetRequestStream();
request.GetRequestStream에서() 함수가 플러그인과 함께 작동하지 않지만 콘솔 내에서 올바르게 작동합니다.
어떤 도움을 주시면 감사하겠습니다 :) 사전에
감사를
참고 : 나는