用以下方法没有问题: //使用TCP通道得到远程对象
//TcpChannel tcpChan = new TcpChannel();
//ChannelServices.RegisterChannel(tcpChan, false);
//IBusinessLogicLayer IBL = (IBusinessLogicLayer)Activator.GetObject(
// typeof(IBusinessLogicLayer),
// "tcp://localhost:8085/BusinessLogic");
//if (IBL == null)
//{
// System.Console.WriteLine("Could not locate TCP server");
// return null;
//}但用以下方法代替,却不知怎么得到接口对象: RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, false);
IBusinessLogicLayer IBL = ?很少玩这个,请各位指教!
//TcpChannel tcpChan = new TcpChannel();
//ChannelServices.RegisterChannel(tcpChan, false);
//IBusinessLogicLayer IBL = (IBusinessLogicLayer)Activator.GetObject(
// typeof(IBusinessLogicLayer),
// "tcp://localhost:8085/BusinessLogic");
//if (IBL == null)
//{
// System.Console.WriteLine("Could not locate TCP server");
// return null;
//}但用以下方法代替,却不知怎么得到接口对象: RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, false);
IBusinessLogicLayer IBL = ?很少玩这个,请各位指教!
解决方案 »
- 如何在silverlight中 把Canvas另存为xalm?
- C# Treeview控件里使用ContextMenuStrip控件
- 关于 #
- 在线等待!~路过得过来看看,帮给个思路。
- 我常用C#+MSSQL开发数据库应用方面的WINFORM程序,感到.NET开的程序运行太慢,数据库开发及报表方面的功能也不强大也不方便,现在想转学D
- 使用名字空间时出错,请指教
- 关于自动接收淘宝消息,淘宝对话框接收消息的控件句柄。
- 请帮我把这段java转换成C#!
- 获取面板中CHekcbox的勾选状态
- 本人正做一个电子图章生成软件,其中的环形文字不知如何现实?(附一段程序,帮忙改一下)
- DataGrid固定列的问题?
- Datagrid自动把负数分成两行,怎么解决呀?
http://msdn.microsoft.com/msdnmag/issues/03/10/Plug-Ins/default.aspx
IBusinessLogicLayer IBL = (IBusinessLogicLayer)Activator.GetObject(typeof(IBusinessLogicLayer), System.Configuration.ConfigurationManager.AppSettings["keyname"]); "tcp://localhost:8085/BusinessLogic"在config中作一个key值:
<appsettings>
<add key = "keyname" value= "tcp://localhost:8085/BusinessLogic" />
</appsettings>