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?
Code:
static async Task async1()
{
try
{
// Create a Service instance
var service = new Service(new Uri("http://localhost:8089"));
await service.LogOnAsync("admin", "test1234");
........................
}
catch(Exception err)
{
Console.WriteLine("Message=",err.Message);
}
}
static void Main(string[] args)
{
Task.Run(()=> async1());
Console.ReadKey();
}
... View more