C# SDK - ASP.NET Core 2.1 - The SSL connection could not be establishedbypass invalid SSL certificate in .net coreThe remote certificate is invalid according to the validation procedure - can`t solve thisCould not establish trust relationship for SSL/TLS secure channel — SOAPCould not create SSL/TLS secure channel, despite setting ServerCertificateValidationCallbackUnexpected outcome of node.js vs ASP.NET Core performance testIs OAuthAuthorizationServerProvider availabe in asp.net core 2.1?Performance improvements from ASP.NET Core 2.1 for full .NET framework?can't run.net core 2.1 app on VS 2017 (15.7.5)Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions' on ASP.NET Core only on Windows PCThe SSL connection could not be establishedSSL Handshake exception for HTTP Get method - ASP.NET core 2.1The SSL connection could not be established, see inner exception

Why do opposition parties not want an election?

Word for something that used to be popular but not anymore

I won a car in a poker game. How is that taxed in Canada?

Why did Boris Johnson call for new elections?

Filling attribute tables with values from the same attribute table

Owner keeps cutting corners and poaching workers for his other company

Bit floating sequence

If every star in the universe except the Sun were destroyed, would we die?

Draw the ☣ (Biohazard Symbol)

How do I make my fill-in-the-blank exercise more obvious?

Python reimplementation of Lost In Space by Tim Hartnell

Is it right to use the ideas of non-winning designers in a design contest?

Examples where "thin + thin = nice and thick"

How do I write a vertically-stacked definition of a sequence?

What exactly is Apple Cider

Loss function (and encoding?) for angles

How do English-speaking kids loudly request something?

Explanation of switch statement constraints on variably modified types in C standard

Was Rosie the Riveter sourced from a Michelangelo painting?

Book/story which features a mental link to a prophet

Laptop failure due to constant fluctuation of AC frequency and voltage

Is storing sensitive data in files instead of a database safe?

Fantasy Military Arms and Armor: the Dwarven Grand Armory

Passport - tiny rip on the edge of my passport page



C# SDK - ASP.NET Core 2.1 - The SSL connection could not be established


bypass invalid SSL certificate in .net coreThe remote certificate is invalid according to the validation procedure - can`t solve thisCould not establish trust relationship for SSL/TLS secure channel — SOAPCould not create SSL/TLS secure channel, despite setting ServerCertificateValidationCallbackUnexpected outcome of node.js vs ASP.NET Core performance testIs OAuthAuthorizationServerProvider availabe in asp.net core 2.1?Performance improvements from ASP.NET Core 2.1 for full .NET framework?can't run.net core 2.1 app on VS 2017 (15.7.5)Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions' on ASP.NET Core only on Windows PCThe SSL connection could not be establishedSSL Handshake exception for HTTP Get method - ASP.NET core 2.1The SSL connection could not be established, see inner exception






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








-1















C# SDK - ASP.NET Core 2.1 - The SSL connection could not be established



I tried



ServicePointManager.ServerCertificateValidationCallback = delegate return true; ;


It is running in .NET Framework but not in ASP.NET Core.



I also tried



ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;


But I didn't get success in ASP.NET Core



I want to generate self SSL in asp.net core










share|improve this question
































    -1















    C# SDK - ASP.NET Core 2.1 - The SSL connection could not be established



    I tried



    ServicePointManager.ServerCertificateValidationCallback = delegate return true; ;


    It is running in .NET Framework but not in ASP.NET Core.



    I also tried



    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;


    But I didn't get success in ASP.NET Core



    I want to generate self SSL in asp.net core










    share|improve this question




























      -1












      -1








      -1








      C# SDK - ASP.NET Core 2.1 - The SSL connection could not be established



      I tried



      ServicePointManager.ServerCertificateValidationCallback = delegate return true; ;


      It is running in .NET Framework but not in ASP.NET Core.



      I also tried



      ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;


      But I didn't get success in ASP.NET Core



      I want to generate self SSL in asp.net core










      share|improve this question
















      C# SDK - ASP.NET Core 2.1 - The SSL connection could not be established



      I tried



      ServicePointManager.ServerCertificateValidationCallback = delegate return true; ;


      It is running in .NET Framework but not in ASP.NET Core.



      I also tried



      ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;


      But I didn't get success in ASP.NET Core



      I want to generate self SSL in asp.net core







      ssl asp.net-core splunk






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 6:21









      Simply Ged

      3,4348 gold badges21 silver badges28 bronze badges




      3,4348 gold badges21 silver badges28 bronze badges










      asked Mar 28 at 5:57









      lalit sharmalalit sharma

      11 bronze badge




      11 bronze badge

























          1 Answer
          1






          active

          oldest

          votes


















          0
















          In .NET core, you should do this at the HttpClient level rather than use the ServicePointManager object, e.g.



          https://stackoverflow.com/a/44540071/1538039



          I answered a similar question to this here - https://stackoverflow.com/a/55358543/1538039



          While you can bypass the validation in this way, it's not the correct approach if you control the server. You're basically saying 'I've configured the server in a way that means my client can't establish trust, because it doesn't implicitly trust the certificate chain. To get around this, I'm going to accept all errors by adding some code'



          A better solution is to configure the server with a certificate the client can trust, and then things will just work!



          At development time working locally, if you want to use a self-signed certificate then you can install it as a root CA and things should work as expected.



          Once you've got to a stage where you don't control the client, this obviously isn't something you can ask people to do. The only thing to do then is to correctly configure the server with a certificate the client can trust, using something like letsencrypt to generate the cert.






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55391014%2fc-sharp-sdk-asp-net-core-2-1-the-ssl-connection-could-not-be-established%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0
















            In .NET core, you should do this at the HttpClient level rather than use the ServicePointManager object, e.g.



            https://stackoverflow.com/a/44540071/1538039



            I answered a similar question to this here - https://stackoverflow.com/a/55358543/1538039



            While you can bypass the validation in this way, it's not the correct approach if you control the server. You're basically saying 'I've configured the server in a way that means my client can't establish trust, because it doesn't implicitly trust the certificate chain. To get around this, I'm going to accept all errors by adding some code'



            A better solution is to configure the server with a certificate the client can trust, and then things will just work!



            At development time working locally, if you want to use a self-signed certificate then you can install it as a root CA and things should work as expected.



            Once you've got to a stage where you don't control the client, this obviously isn't something you can ask people to do. The only thing to do then is to correctly configure the server with a certificate the client can trust, using something like letsencrypt to generate the cert.






            share|improve this answer





























              0
















              In .NET core, you should do this at the HttpClient level rather than use the ServicePointManager object, e.g.



              https://stackoverflow.com/a/44540071/1538039



              I answered a similar question to this here - https://stackoverflow.com/a/55358543/1538039



              While you can bypass the validation in this way, it's not the correct approach if you control the server. You're basically saying 'I've configured the server in a way that means my client can't establish trust, because it doesn't implicitly trust the certificate chain. To get around this, I'm going to accept all errors by adding some code'



              A better solution is to configure the server with a certificate the client can trust, and then things will just work!



              At development time working locally, if you want to use a self-signed certificate then you can install it as a root CA and things should work as expected.



              Once you've got to a stage where you don't control the client, this obviously isn't something you can ask people to do. The only thing to do then is to correctly configure the server with a certificate the client can trust, using something like letsencrypt to generate the cert.






              share|improve this answer



























                0














                0










                0









                In .NET core, you should do this at the HttpClient level rather than use the ServicePointManager object, e.g.



                https://stackoverflow.com/a/44540071/1538039



                I answered a similar question to this here - https://stackoverflow.com/a/55358543/1538039



                While you can bypass the validation in this way, it's not the correct approach if you control the server. You're basically saying 'I've configured the server in a way that means my client can't establish trust, because it doesn't implicitly trust the certificate chain. To get around this, I'm going to accept all errors by adding some code'



                A better solution is to configure the server with a certificate the client can trust, and then things will just work!



                At development time working locally, if you want to use a self-signed certificate then you can install it as a root CA and things should work as expected.



                Once you've got to a stage where you don't control the client, this obviously isn't something you can ask people to do. The only thing to do then is to correctly configure the server with a certificate the client can trust, using something like letsencrypt to generate the cert.






                share|improve this answer













                In .NET core, you should do this at the HttpClient level rather than use the ServicePointManager object, e.g.



                https://stackoverflow.com/a/44540071/1538039



                I answered a similar question to this here - https://stackoverflow.com/a/55358543/1538039



                While you can bypass the validation in this way, it's not the correct approach if you control the server. You're basically saying 'I've configured the server in a way that means my client can't establish trust, because it doesn't implicitly trust the certificate chain. To get around this, I'm going to accept all errors by adding some code'



                A better solution is to configure the server with a certificate the client can trust, and then things will just work!



                At development time working locally, if you want to use a self-signed certificate then you can install it as a root CA and things should work as expected.



                Once you've got to a stage where you don't control the client, this obviously isn't something you can ask people to do. The only thing to do then is to correctly configure the server with a certificate the client can trust, using something like letsencrypt to generate the cert.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 28 at 13:20









                Dylan MorleyDylan Morley

                8345 silver badges10 bronze badges




                8345 silver badges10 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















                    draft saved

                    draft discarded















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55391014%2fc-sharp-sdk-asp-net-core-2-1-the-ssl-connection-could-not-be-established%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript