Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3425508
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:36:08+00:00 2026-05-18T06:36:08+00:00

I have written a c# app to migrate my data from Blinksale to Freeagent.

  • 0

I have written a c# app to migrate my data from Blinksale to Freeagent. This is all working fine and I am making the various web service calls suitably however when I run the process as a batch it gets to the 3rd invoice on the import and times out. On a like like

            Stream dataStream = request.GetRequestStream ();

Now I’ve contacted the API provider (Freeagent), who are very good, and they have checked the logs, and the first 2 attempts are made (which consist of 3 individual calls each) but there is no sign of the 3rd request. This would make it about the 8th request to this web service, but there may have been quite a few using similar code prior to this to get the data.

Therefore I am assuming it is something to do with my .net code.

Its hard for me to share any snippets as there is so much going on, but essentially I am doing the same thing as this multiple times.

N.B. I have checked and it isnt the data in the 3rd request thats in question (I skipped it with same result)

// 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 ();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:36:09+00:00Added an answer on May 18, 2026 at 6:36 am

    Wow, so much code. Try this:

    using (var client = new WebClient())
    {
        var values = new NameValueCollection
        {
            { "key", "This is a test that posts this string to a Web server." }
        };
        string url = "http://www.contoso.com/PostAccepter.aspx";
        byte[] result = client.UploadValues(url, values);
        Console.WriteLine(Encoding.UTF8.GetString(result));
    }
    

    If this doesn’t work it’s a network and/or server problem. You could also activate logs on the client by putting the following in your app/web.config to know exactly what’s happening on the HTTP stack:

    <system.diagnostics>
      <sources>
        <source name="System.Net" tracemode="protocolonly">
          <listeners>
            <add name="System.Net" type="System.Diagnostics.TextWriterTraceListener" initializeData="network.log" />
          </listeners>
        </source>
      </sources>
    
      <switches>
        <add name="System.Net" value="Verbose"/>
      </switches>
    
      <trace autoflush="true" />
    </system.diagnostics>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.