This is an easy way to set your explicit credentials programmatically ...
object proxy = Activator.GetObject(resourceType, endPoint);
ICredentials networkCredentials = new NetworkCredential(userName, password, domain);
IDictionary dictionary = ChannelServices.GetChannelSinkProperties(proxy);
dictionary["credentials"] = networkCredentials;
Your proxy is now ready to invoke the necessary secured methods on the remote object. Setting your credentials programmatically can be convenient for quick testing purposes. Most of the time you will solely rely on configuration settings, but this can be a tedious task from time to time.