问候,当我尝试为我的工厂设置凭据时出现以下问题:
ChannelFactory<IWCFSeekService> factory = Factory;
if (factory != null)
{
factory.Credentials.UserName.UserName = CServiceCredentials.Instance.Username;
_Channel = factory.CreateChannel();
}
我得到一个对象是只读的异常。当我想设置用户名时会发生这种情况。