I had a similar problem and had to convert the URL from string to Uri object using:
Uri myUri = new Uri(URLInStringFormat, UriKind.Absolute);
(URLInStringFormat is your URL) Try to connect using the Uri instead of the string as:
WebClient client = new WebClient();
Here's a question...and forgive my ignorance if it doesn't make sense, not a developer. This extension works assuming the platform server has access to the target machine. What if you had a requirement in a closed network where the platform server could not access a local resource. How could you create a socket within the browser to talk directly to an on-net resource. I know it can be done with JS (Chrome Secure Shell) but can it be done using this library? Could it be done with the library in conjunction with JS?
This component runs in the server only. You may be able to achieve something similar with a browser plugin, (such as Secure Shell, which I believe is not just plain JS) and in that case you won't need this component.