Is it possible to set clientcredentials for an WCF in App.config?
I would like to avoid doing this:
Using svc As New MyServiceClient
svc.ClientCre
As far as I know, that is not possible using the serviceModel configuration section due to the security hole it would create. But you could create regular appSettings for these values and use them in code:
svc.ClientCredentials.UserName.UserName = ConfigurationManager.AppSettings("...")
I would advise against this approach though, unless you encrypt the configuration file.