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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:06:05+00:00 2026-05-17T19:06:05+00:00

While using a Visual Studio Web Reference to a SOAP service on a server

  • 0

While using a Visual Studio “Web Reference” to a SOAP service on a server that requires an HTTPS connection I get the error:
“The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.”

The parent class of the client is SoapHTTPClientProtocol if that makes any difference.

I am not in the position to modify the certificate of the server. Is there a programmatic way to accept the certificate?
Googling around I found several references to the ServicePointManager class but none comprehensive enough that I understand how to make use of it.

http://support.microsoft.com/kb/915599

Has anyone else encountered this error?

  • 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-17T19:06:05+00:00Added an answer on May 17, 2026 at 7:06 pm

    Try calling this before calling the service:

    ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications);
    

    And put this callback method in:

        private static bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
        {
            return true;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using Visual studio 2008. Every once in a while files that exist in
Unlike this question: Linker Error while building application using Boost Asio in Visual Studio
I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; using Northwind; N00b here, Trying to customize a asp.net gridview
While using Web Deploy with Visual Studio 2010, it automatically loads the first 2
I want to publish a Web Service written in Visual Studio 2010 using WCF
I'm using Xcode for C++ on my computer while using Visual Studio at school.
Using Visual Studio or Resharper, can I jump to the .aspx page while in
I stuck while trying to compile qpid c++ with boost 1_47_0 using Visual Studio
I've been using ClickOnce on Visual Studio 2008 SP1 for a while without incident.

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.