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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:48:26+00:00 2026-05-21T06:48:26+00:00

I am getting an issue while fetching the list of hosted services. My code

  • 0

I am getting an issue while fetching the list of hosted services. My code is as below:

 string requestUrl = "https://management.core.windows.net/" + SubscriptionID + "/services/hostedservices";

        string ReturnBody = string.Empty;
        WebResponse resp = null;
        try
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
            NameValueCollection RequestHeaders = new NameValueCollection();
            RequestHeaders.Add("x-ms-version", x_ms_version);
            X509Certificate cert = X509Certificate.CreateFromCertFile(CertificatePath);
            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(requestUrl);
            request.Method = "GET";
            request.ClientCertificates.Add(cert);
            request.KeepAlive = false;
            request.ProtocolVersion = HttpVersion.Version10;
            if (RequestHeaders != null)
                request.Headers.Add(RequestHeaders);
            resp = request.GetResponse();              
        }
        catch (WebException webEx)
        {
            //ERROR: The request was aborted: Could not create SSL/TLS secure channel.” error.
        }
        catch (Exception excep)
        {

        }
        finally
        {
            if (resp != null) { resp.Close(); }
            resp = null;
        }  

I am getting “The request was aborted: Could not create SSL/TLS secure channel” while running above code…
One starnge point regarding this is that same code is working fine in one of my WPF application, but giving an error in Web Application.
So, it may issue of IIS security, I have made unsuccessfull attempt by giving permission to everyone for that folder.

Thanks in advance for your ideas.

Naresh Goradara

  • 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-21T06:48:27+00:00Added an answer on May 21, 2026 at 6:48 am

    I believe I responded to this question on MSDN forums: http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/5e6a2cfd-c2b6-4880-a79c-4bf39f4d7ca8/#b427afb6-d68f-4591-8466-870e791b43c9

    Did you try out the suggestion I made? What’s the error you’re getting even after that.

    Gaurav

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

Sidebar

Related Questions

I am getting an issue to run the below code.The code gives no error
Possible Duplicate: Getting an issue while checking the dynamically generated checkbox through list view
I have an issue while getting the file name with out extension from a
I've been coding for a while now but seem to be getting this issue
While getting our WCF Data Service ready for production we encountered an issue with
I'm having an issue getting some code to work. Is there a way to
I am getting the append issue with this code. In my xml i go
I am getting the an error while reading a file and below is the
I am getting issue on Microsoft internet explorer certificate while encrypt with private key
I've been searching for a while for an explanation to this issue but getting

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.