<?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 Re: Http Event Collector C# not working in Security</title>
    <link>https://community.splunk.com/t5/Security/Http-Event-Collector-C-not-working/m-p/551262#M12223</link>
    <description>&lt;P&gt;Hi All , I am new to Splunk n facing a similar issue,&lt;BR /&gt;Added all dlls from nuget n setup an account with Token,&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't see any logs in dash board on search&lt;/P&gt;&lt;P&gt;Need a Help on this&lt;BR /&gt;below is the code -&amp;nbsp;&lt;/P&gt;&lt;P&gt;ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };&lt;/P&gt;&lt;P&gt;var middleware = new HttpEventCollectorResendMiddleware(100);&lt;BR /&gt;var ecSender = new HttpEventCollectorSender(new Uri("http://localhost:8088/"),&lt;BR /&gt;"bacdb24e-ee37-40cc-8d81-9b2f6d95784f", null, HttpEventCollectorSender.SendMode.Sequential, 0, 0, 0, middleware.Plugin);&lt;/P&gt;&lt;P&gt;ecSender.OnError += o =&amp;gt; Console.WriteLine(o.Message);&lt;/P&gt;&lt;P&gt;ecSender.Send(DateTime.UtcNow.AddDays(-1), Guid.NewGuid().ToString(), "INFO", null,&lt;BR /&gt;new { Foo = "Bar", test2 = "Testit2", time = ConvertToEpoch(DateTime.UtcNow.AddHours(-2)).ToString(), anotherkey="RohitKeyvalue1" });&lt;/P&gt;&lt;P&gt;ecSender.Send(Guid.NewGuid().ToString(), "INFO", null,&lt;BR /&gt;new { Foo = "Bar", test2 = "Testit2", time = ConvertToEpoch(DateTime.UtcNow.AddHours(-2)).ToString(), anotherkey = "RohitKeyvalue2" });&lt;/P&gt;&lt;P&gt;await ecSender.FlushAsync();&lt;/P&gt;</description>
    <pubDate>Tue, 11 May 2021 16:39:45 GMT</pubDate>
    <dc:creator>Rohit24c</dc:creator>
    <dc:date>2021-05-11T16:39:45Z</dc:date>
    <item>
      <title>Http Event Collector C# not working</title>
      <link>https://community.splunk.com/t5/Security/Http-Event-Collector-C-not-working/m-p/296451#M7941</link>
      <description>&lt;P&gt;There is the sameple snippet found online:&lt;/P&gt;

&lt;P&gt;var middleware = new HttpEventCollectorResendMiddleware(100);&lt;BR /&gt;
var ecSender = new HttpEventCollectorSender(new Uri("&lt;A href="https://localhost:8088%22"&gt;https://localhost:8088"&lt;/A&gt;),&lt;BR /&gt;
    "3E712E99-63C5-4C5A-841D-592DD070DA51",&lt;BR /&gt;
    null,&lt;BR /&gt;
    HttpEventCollectorSender.SendMode.Sequential,&lt;BR /&gt;
    0,&lt;BR /&gt;
    0,&lt;BR /&gt;
    0,&lt;BR /&gt;
    middleware.Plugin&lt;BR /&gt;
);&lt;BR /&gt;
ecSender.OnError += o =&amp;gt; Console.WriteLine(o.Message);&lt;BR /&gt;
ecSender.Send(Guid.NewGuid().ToString(), "INFO", null, new { Foo = "Bar" });&lt;BR /&gt;
dynamic obj = new JObject();&lt;BR /&gt;
obj.Bar = "Baz";&lt;BR /&gt;
ecSender.Send(Guid.NewGuid().ToString(), "INFO", null, (JObject)obj);&lt;BR /&gt;
await ecSender.FlushAsync();&lt;/P&gt;

&lt;P&gt;I have to playing around with different port and uri but I have no luck populating stuff to splunk. I have change the token as well. Those are the only two things I've change. I've also tried to change .NET framework version from 4.6.1 to 4.5.2 but still no luck. Can someone know what are the most common problem in this scenario? &lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 05:24:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Http-Event-Collector-C-not-working/m-p/296451#M7941</guid>
      <dc:creator>johnchen0213</dc:creator>
      <dc:date>2018-03-29T05:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Http Event Collector C# not working</title>
      <link>https://community.splunk.com/t5/Security/Http-Event-Collector-C-not-working/m-p/296452#M7942</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
try adding this as the first line of your code:&lt;/P&gt;

&lt;P&gt;ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 14:57:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Http-Event-Collector-C-not-working/m-p/296452#M7942</guid>
      <dc:creator>GrahamX</dc:creator>
      <dc:date>2018-06-05T14:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Http Event Collector C# not working</title>
      <link>https://community.splunk.com/t5/Security/Http-Event-Collector-C-not-working/m-p/551262#M12223</link>
      <description>&lt;P&gt;Hi All , I am new to Splunk n facing a similar issue,&lt;BR /&gt;Added all dlls from nuget n setup an account with Token,&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't see any logs in dash board on search&lt;/P&gt;&lt;P&gt;Need a Help on this&lt;BR /&gt;below is the code -&amp;nbsp;&lt;/P&gt;&lt;P&gt;ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };&lt;/P&gt;&lt;P&gt;var middleware = new HttpEventCollectorResendMiddleware(100);&lt;BR /&gt;var ecSender = new HttpEventCollectorSender(new Uri("http://localhost:8088/"),&lt;BR /&gt;"bacdb24e-ee37-40cc-8d81-9b2f6d95784f", null, HttpEventCollectorSender.SendMode.Sequential, 0, 0, 0, middleware.Plugin);&lt;/P&gt;&lt;P&gt;ecSender.OnError += o =&amp;gt; Console.WriteLine(o.Message);&lt;/P&gt;&lt;P&gt;ecSender.Send(DateTime.UtcNow.AddDays(-1), Guid.NewGuid().ToString(), "INFO", null,&lt;BR /&gt;new { Foo = "Bar", test2 = "Testit2", time = ConvertToEpoch(DateTime.UtcNow.AddHours(-2)).ToString(), anotherkey="RohitKeyvalue1" });&lt;/P&gt;&lt;P&gt;ecSender.Send(Guid.NewGuid().ToString(), "INFO", null,&lt;BR /&gt;new { Foo = "Bar", test2 = "Testit2", time = ConvertToEpoch(DateTime.UtcNow.AddHours(-2)).ToString(), anotherkey = "RohitKeyvalue2" });&lt;/P&gt;&lt;P&gt;await ecSender.FlushAsync();&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Http-Event-Collector-C-not-working/m-p/551262#M12223</guid>
      <dc:creator>Rohit24c</dc:creator>
      <dc:date>2021-05-11T16:39:45Z</dc:date>
    </item>
  </channel>
</rss>

