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 8639219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:56:51+00:00 2026-06-12T10:56:51+00:00

When I first make a HttpWebRequest in a Winform App, it takes 10~30 seconds

  • 0

When I first make a HttpWebRequest in a Winform App, it takes 10~30 seconds to process the first request. Subsequent calls takes less than a second. I wrote a little POC app to exemplify this, it consists of two buttons and 2 textBoxes, an image of the app can be found here (I can’t upload images here yet…):

enter image description here

The app code is very simple:

public partial class Form1 : Form
{
    DateTime _start;
    TimeSpan _span;
    int _count = 0;
    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }

    private void button1_Click(object sender, EventArgs e)
    {
        _count++;
        _start = DateTime.Now;
        HttpWebRequest _request = (HttpWebRequest)WebRequest.Create(textBox1.Text); ;
        // Added after Conrad's response:
        _request.CachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
        HttpWebResponse _response = (HttpWebResponse)_request.GetResponse(); 
        _response.Close();
        _span = DateTime.Now - _start;
        textBox2.Text += _count.ToString("000") + ": " + _span.ToString(@"mm\:ss\,fff") + "\r\n";
    }

    private void button2_Click(object sender, EventArgs e)
    {
        textBox2.Text = "";
    }
}

Why does it take so long in the 1st request? There is something I can do to speed this up?

  • 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-06-12T10:56:52+00:00Added an answer on June 12, 2026 at 10:56 am

    If you set the proxy property to null it will work as well, even without disabling the logical cards.

    Source: HttpWebRequest runs slowly first time within SQLCLR

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to make a First Access Database Setup Process in my spring
I have attempted to make my first 3 tier application. In the process I
I'm trying to make my first app for Microsoft Surface. I need to use
I am trying to make my first app using XNA, and I am having
I need to make from my app an authentificated httpwebrequest. the response to my
I have a database with the columns: id, pdate, pvalue1, pvalue2. First I make
How to make the first matrix look like the latter? The code of the
I am attempting to make my first mobile website by just using a different
I trying to make my first AJAX with JSON call using jQuery and CodeIgniter.
say I want to make the first row of the excel ss something like

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.