WCF Net.Tcp 传输用户名



我只想像这样传输用户名。客户端发送:

client.ClientCredentials.UserName.UserName = "name";

在消耗服务器的服务器上服务:

OperationContext.Current.ServiceSecurityContext.PrimaryIdentity.Name;

但它需要某种安全模式来传输或消息。我不会使用它们中的任何一个来保护,只会传输名称。我认为所有安全模式都是源或耗时的(一个请求的更多连接)。

是否存在如何以良好的效率或性能运输它的可能性?

多谢。

尝试使用 [服务合同(保护级别=保护级别.无)]

最新更新