When I use c# 2.0 SDK calll service.LogOnAsync function, I receive the following message:
Message: The underlying connection was closed: The connection was closed unexpectedly.
How to solve it?
static async Task async1()
// Create a Service instance
var service = new Service(new Uri("http://localhost:8089"));
await service.LogOnAsync("admin", "test1234");
static void Main(string args)
You should be using https://localhost:8089 not http
This is the Splunk Daemons rest API port and it’s SSL by default (https).
I try it using https://localhost:8089.But i receive the message:
The underlying connection is down: A trust relationship cannot be established for the SSL/TLS secure channel.