Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


pru
  •  pru
  • No customer Topic Starter
2016-05-24T08:26:02Z
Hi, I've created a new, simple console application, which connects to VisualCron by .NET API and later on disconnects. However, the ConsoleApplication doesn't exit. Could you tell me how to fix it? Here is the code:

Quote:


static void Main(string[] args)
{
var c = new Client();
c.LogToFile = false;
var conn = new Connection
{
Address = "54.217.38.228",
UseADLogon = false
};
conn.UserName = "admin";
conn.PassWord = "";
conn.Port = 16444;
conn.ConnectionType = Connection.ConnectionT.Remote;
var s = c.Connect(conn, true);
s.Disconnect();
s.Dispose();
Console.WriteLine("The application should close now... but doesn't.");
return;
}

Sponsor
Forum information
Support
2016-05-24T08:35:43Z
Try disposing the Client as well.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
pru
  •  pru
  • No customer Topic Starter
2016-05-24T08:45:37Z
Now it works. Why do you obfuscate the code? It makes the development slower.

BTW. Should be the Client or Server Disposed first?
Support
2016-05-24T09:13:23Z
Disposing the Client should also dispose all servers.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top