Getting Data In

c# sdk not working on Windows server

didier_again
Explorer

Hi,

I'm using the Splunk SDK (C#) to run searches against our Splunk Server.

The code I have is from the examples, nothing fancy.
It works fine on my Windows 7 machine. I run the search, I get the results, all is good.

But when I deploy on a Windows 2008 Server, it simply refuses to run.
I get the following exception: "The request was aborted: The request was canceled."

Using the .Net trace feature, the last thing I see in the logs is: "This is to override browser formatting; see server.conf[httpServer] to disable" (more log dump at the end of this post)

To me, it seems that this is what is killing my search. That there's something in the response that Windows Server doesn't like. But that's a bit of a guess.

I've tried a few things, but no matter, it will not run on Windows Server.
Any idea or pointers welcome because I'm running out of things to try here ...

Thanks for reading.

More dump from the .NET trace logs:

System.Net Verbose: 0 : [3508] 00000000 : 3C 3F 78 6D 6C 20 76 65-72 73 69 6F 6E 3D 22 31 : <?xml version="1
System.Net Verbose: 0 : [3508] 00000010 : 2E 30 22 20 65 6E 63 6F-64 69 6E 67 3D 22 55 54 : .0" encoding="UT
System.Net Verbose: 0 : [3508] 00000020 : 46 2D 38 22 3F 3E 0A 3C-21 2D 2D 54 68 69 73 20 : F-8"?>.<!--This 
System.Net Verbose: 0 : [3508] 00000030 : 69 73 20 74 6F 20 6F 76-65 72 72 69 64 65 20 62 : is to override b
System.Net Verbose: 0 : [3508] 00000040 : 72 6F 77 73 65 72 20 66-6F 72 6D 61 74 74 69 6E : rowser formattin
System.Net Verbose: 0 : [3508] 00000050 : 67 3B 20 73 65 65 20 73-65 72 76 65 72 2E 63 6F : g; see server.co
System.Net Verbose: 0 : [3508] 00000060 : 6E 66 5B 68 74 74 70 53-65 72 76 65 72 5D 20 74 : nf[httpServer] t
System.Net Verbose: 0 : [3508] 00000070 : 6F 20 64 69 73 61 62 6C-65 2E 20 2E 20 2E 20 2E : o disable. . . .
System.Net Verbose: 0 : [3508] 00000080 : 20 2E 20 2E 20 2E 20 2E-20 2E 20 2E 20 2E 20 2E :  . . . . . . . .
System.Net Verbose: 0 : [3508] 00000090 : 20 2E 20 2E 20 2E 20 2E-20 2E 20 2E 20 2E 20 2E :  . . . . . . . .
System.Net Verbose: 0 : [3508] 000000A0 : 20 2E 20 2E 20 2E 20 2E-20 2E 20 2E 20 2E 20 2E :  . . . . . . . .
Tags (3)
0 Karma

didier_again
Explorer

It turns out, it has nothing to do with Windows Server.
My problem is the same as this one: http://answers.splunk.com/answers/102567/c-sdk-builds-the-connection-was-closed-unexpectedly

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...