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

  • Home
  • SEARCH
  • 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 486055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:27:51+00:00 2026-05-13T01:27:51+00:00

I have a file on a secured site I would like to download using

  • 0

I have a file on a secured site I would like to download using a WPF application. The file is a tab delimited text file at a URL of the form https://my.server.com/test/my_file.txt. Here is the code that I have so far:

Uri uri = new Uri("https://my.server.com/test/my_file.txt");
System.Net.WebClient client = new System.Net.WebClient();
try
{
    client.DownloadFile(uri, "my_file.txt");
}
finally
{
    client.Dispose();
}

However, this throws a System.Net.WebException with the message “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.”

Attempting to reach the file in by web browser first brings up the warning that the certificate issued by the server is not trusted, but in most modern browsers you can step through and reach the file successfully.

  • 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-13T01:27:52+00:00Added an answer on May 13, 2026 at 1:27 am

    Have a look at ServicePointManager.ServerCertificateValidationCallback– it lets you define a custom validation method (so you can ignore whatever parts of the cert validation are failing for you).

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

Sidebar

Related Questions

I have a secured site using ssl. I have a php file that checks
I have a website which allows secure (ssl) file uploads and download. The site
I have added a like button using iFrame for the site and added the
I have password protected my entire website using .htaccess but I would like to
I have file with lines like so: 1 17 A G R:560:500:60:10.71%:1.6329E-19 Pass:1.0:276:0:57:0:1E0 15
I have file with name contact.php, inside I have form: <form method=post name=kontakt action=send_mail.php>
Suppose that we have file like this: sometext11 sometext12 sometext13 sometext21 sometext22 sometext23 Texts
Suppose I have file which goes like this : a void measure() { a
it must be jquery I have file text.html with 6 div in (a,b,c,d,e,f) In
I have been trying to post login credentials to an https site using cURL

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.