读书人

请将下面这段remoting设置改成config配

发布时间: 2012-01-31 21:28:42 作者: rapoo

请将下面这段remoting设置改成config配置格式,谢谢
BinaryServerFormatterSinkProvider provider = new BinaryServerFormatterSinkProvider();

provider.TypeFilterLevel = TypeFilterLevel.Full;
// 设置通道属性
IDictionary props = new Hashtable();
props[ "port "] = 8085;

//注册信道

TcpChannel chan = new TcpChannel(props, null, provider);

ChannelServices.RegisterChannel(chan);
//注册提供服务的远程对象
RemotingConfiguration.RegisterWellKnownServiceType(typeof(ydglDB), "ydglDB ", WellKnownObjectMode.Singleton);

[解决办法]
up
[解决办法]
<system.runtime.remoting>
<application>
<channels>
<channel ref= "tcp " port= "8085 "/>
<serverProviders>
<formatter ref= "binary " />
</serverProviders>
</channels>
<service>
<wellknown mode= "Singleton " type= "ydglDB,ydglDB " objectUri= "ydglDB.rem " />
</service>
</application>
</system.runtime.remoting>

读书人网 >C#

热点推荐