Я написал приложение ac # для переноса моих данных из Blinksale во Freeagent.Все это работает нормально, и я выполняю различные вызовы веб-службы соответствующим образом, однако, когда я запускаю процесс как пакет, он получает 3-й счет по импорту и время ожидания.Примерно как
Stream dataStream = request.GetRequestStream ();
Теперь я связался с провайдером API (Freeagent), который очень хорош, проверил логи, и сделаны первые 2 попытки (которые состоят из 3 отдельныхзвонит каждому) но нет никаких признаков 3-го запроса.Это сделало бы это о восьмом запросе к этому веб-сервису, но, возможно, довольно многие использовали подобный код до этого для получения данных.
Поэтому я предполагаю, что это как-то связано с моим.net code.
Мне сложно делиться какими-либо фрагментами, поскольку так много всего происходит, но по сути я делаю то же самое, что и это несколько раз.
NB Я проверил, и этоРазве это не данные в 3-м запросе (это я пропустил с тем же результатом)
// Create a request using a URL that can receive a post.
WebRequest request = WebRequest.Create ("http://www.contoso.com/PostAccepter.aspx ");
// Set the Method property of the request to POST.
request.Method = "POST";
// Create POST data and convert it to a byte array.
string postData = "This is a test that posts this string to a Web server.";
byte[] byteArray = Encoding.UTF8.GetBytes (postData);
// Set the ContentType property of the WebRequest.
request.ContentType = "application/x-www-form-urlencoded";
// Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length;
// 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 ();
// Get the response.
WebResponse response = request.GetResponse ();
// Display the status.
Console.WriteLine (((HttpWebResponse)response).StatusDescription);
// Get the stream containing content returned by the server.
dataStream = response.GetResponseStream ();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader (dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd ();
// Display the content.
Console.WriteLine (responseFromServer);
// Clean up the streams.
reader.Close ();
dataStream.Close ();
response.Close ();