<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic C# SDK - ASP.NET Core 2.1 - The SSL connection could not be established in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/C-SDK-ASP-NET-Core-2-1-The-SSL-connection-could-not-be/m-p/440606#M7992</link>
    <description>&lt;P&gt;I am using SPLUNK SDK for C# (&lt;A href="http://dev.splunk.com/csharp"&gt;Splunk c# SDK&lt;/A&gt; ) in my ASP.NET core application.  I am trying to connect to my localhost:8089 Splunk service via this SDK, but I get an exception saying: &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;And The inner exception says:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;The remote certificate is invalid according to the validation procedure.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;This SDK uses HTTP client under the hood, but I don't have access to this object to configure HttpClientHandler.  &lt;/P&gt;

&lt;P&gt;All my search on google ends up using ServicePointManager to bypass the SSL validation, but this solution doesn't work in Asp.Net core. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there any way to bypass this validation in asp.Net core?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Oct 2018 00:01:23 GMT</pubDate>
    <dc:creator>mohsenvafa</dc:creator>
    <dc:date>2018-10-23T00:01:23Z</dc:date>
    <item>
      <title>C# SDK - ASP.NET Core 2.1 - The SSL connection could not be established</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/C-SDK-ASP-NET-Core-2-1-The-SSL-connection-could-not-be/m-p/440606#M7992</link>
      <description>&lt;P&gt;I am using SPLUNK SDK for C# (&lt;A href="http://dev.splunk.com/csharp"&gt;Splunk c# SDK&lt;/A&gt; ) in my ASP.NET core application.  I am trying to connect to my localhost:8089 Splunk service via this SDK, but I get an exception saying: &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;And The inner exception says:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;The remote certificate is invalid according to the validation procedure.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;This SDK uses HTTP client under the hood, but I don't have access to this object to configure HttpClientHandler.  &lt;/P&gt;

&lt;P&gt;All my search on google ends up using ServicePointManager to bypass the SSL validation, but this solution doesn't work in Asp.Net core. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there any way to bypass this validation in asp.Net core?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 00:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/C-SDK-ASP-NET-Core-2-1-The-SSL-connection-could-not-be/m-p/440606#M7992</guid>
      <dc:creator>mohsenvafa</dc:creator>
      <dc:date>2018-10-23T00:01:23Z</dc:date>
    </item>
  </channel>
</rss>

