Translating C web proxy to C#