Custom Credentials in TCP Remoting using C#
Having been looking at custom credentials in TCP remoting there was an issue when switching between custom credentials and using the default credentials of the current process (this is the default behaviour). The following C# code sample shows how to pass the custom credentials to the remoting object by modifying the sink properties using the following command. IDictionary Properties = ChannelServices .GetChannelSinkProperties(Current); The issue that didn't seem clear was how do you switch back to using the default credentials... After trying a few different methods it seems that you need to modify the IDictionary and rather than removing the credentials from the collection set them to null as seen in the example below. /// <summary> /// Connects to the service remote using the specified settings /// </summary> /// <param name="MachineName"> The name of the remote machine to connect to </param> /// <para