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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:13:54+00:00 2026-06-17T04:13:54+00:00

I have a very odd machine-specific issue. On some machines, the code below works,

  • 0

I have a very odd machine-specific issue. On some machines, the code below works, on others it freezes until a timeout exception is thrown on by GetResponse() call.

string url = "https://myserver/myimage.png";

System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) =>
{
     return true;
});

HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
req.Method = "GET";
req.AllowAutoRedirect = false;

try
{
    using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
    {
        Console.WriteLine("Success");
    }
}
catch (Exception ex)
{
    Console.WriteLine("Error: " + ex.ToString());
}

Console.ReadKey();

I can’t find any OS/configuration pattern between the machines that work and the ones that fail. This is a console application running with an administrator user.

The only particular thing about this is that the URL being accessed is an image running into a test server that is using a self-issued SSL certificate, so it needed the workaround using ServerCertificateValidationCallback displayed in the code above.

Other URLs I tested worked properly.

Can anyone help me identify possible causes for this issue and workarounds?

  • 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-17T04:13:55+00:00Added an answer on June 17, 2026 at 4:13 am

    As usual, it’s quite simple once you figure it out: The machines where the problem was not present had .Net Framework 4.5 installed.

    This is very likely due to the fact that 4.5 is an in-place update for 4.0, and includes several bugfixes to the core libraries.

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

Sidebar

Related Questions

I have a very odd issue. When I execute a specific database stored procedure
I have a very odd problem with the following code. For some reason I
This is very odd. I have never had this issue with ShowDialog in C#.
Ok, so I have some problems with C++ iostreams that feels very odd, but
I have an object in PHP with some very odd property names. I just
This is my first question on S.O. I have a very odd problem. Below
I have a very odd performance issue with an SSIS package in Sql Server
I have a very odd problem with javascript. My code is rather long so
I have a very odd issue trying to run this quite simple C program
I've got some very odd behaviour going on. I have the following JQuery: myElement.fadeOut(100);

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.