make connect logic sync and clear for exception on c# client
add more test for c#client