Using client side certificates with .net Remoting over HTTP

Remoting does support https and client side certificates over the HTTP channel when hosted in asp.net under IIS. Nothing special needs to be done on the client side for https. Just using https:// scheme in the server url is sufficient. For client certificates however you need to set them on the client channel sink properties. Here is some pseudo code which shows getting and setting channel sink properties:

// get the proxy

ServerType proxy = (ServerType)RemotingServices.Connect(typeof(ServerType), "https://foo.com/server.rem");

// get channel sink properties for the server proxy;

IDictionary dict = ChannelServices.GetChannelSinkProperties(proxy);

// add the client certificates

dict["clientcertificates"] = yourX509CertificateCollection;

// invoke the server method.

proxy.ServerMethod();

 

For http client you could also set properties like preauthenticate, a custom NetworkCredential and allowautoredirect apart from the ones on the HttpClientChannel itself (like username/password, proxyname, timeout, etc.). These properties are inturn fed to a HttpWebRequest the sink creates for each outgoing http request.