Added connection code for .Net client