Splunk Dev

C# SDK examples

rmorlen
Splunk Employee
Splunk Employee

I downloaded the SDK, opened the project in VS 2012. Built the solution. Setup .splunkrc. None of the examples work. Many of the Unit Tests fail. Where is the proper place to get help on this?

Tags (2)
1 Solution

rmorlen
Splunk Employee
Splunk Employee

The issue was related to HOMEDRIVE environment variable mapped to a remote machine. A workaround, in this case, is to create a new env variable (and use it in the Command.Splunkrc()that points to local C:\ and put the .splunkrc in this new location.

Another option is to modify Command.cs to the following:

//  const string ToExpand = "%HOMEDRIVE%%HOMEPATH%";

const string ToExpand = "%LOCALAPPDATA%";
</code></pre>

This will look for the file in the c:\users\myuserid\AppData\Local directory.

View solution in original post

rmorlen
Splunk Employee
Splunk Employee

The issue was related to HOMEDRIVE environment variable mapped to a remote machine. A workaround, in this case, is to create a new env variable (and use it in the Command.Splunkrc()that points to local C:\ and put the .splunkrc in this new location.

Another option is to modify Command.cs to the following:

//  const string ToExpand = "%HOMEDRIVE%%HOMEPATH%";

const string ToExpand = "%LOCALAPPDATA%";
</code></pre>

This will look for the file in the c:\users\myuserid\AppData\Local directory.

Neeraj_Luthra
Splunk Employee
Splunk Employee

What specific issues are you running into? Can you provide more detail? Feel free to email me directly and I would be happy to look into it.

0 Karma
Get Updates on the Splunk Community!

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...