Updated C# agent connection