方法 : authenticationMode 構成プロパティを設定する
この例のコードは、authenticationMode 構成プロパティをプログラムで設定する方法を示しています。
使用例
// Specify server channel properties.
IDictionary dict = new Hashtable();
dict["port"] = 9090;
dict["authenticationMode"] = "IdentifyCallers";
// Set up a server channel.
TcpServerChannel serverChannel = new TcpServerChannel(dict,null);
//Create an HttpChannel object and register the channel
ChannelServices.RegisterChannel(serverChannel);
コードのコンパイル方法
この例では、下記が必要です。
- System、System.Collections、および System.Runtime.Remoting.Channels.Tcp の各名前空間への参照。