什么啊?
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Net;
using System.Net.Sockets;
namespace ConsoleApplication1
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
///
[STAThread]
static void Main(string[] args)
{
TcpChannel chan = new TcpChannel(8085);
ChannelServices.RegisterChannel(chan);
RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType("RemotingSamples.HelloServer,object"), "SayHello", WellKnownObjectMode.SingleCall);
System.Console.WriteLine("点击 <enter> 退出...");
System.Console.ReadLine();
return 0;
}
}
}
编译:
C:\Documents and Settings\Administrator\桌面\ConsoleApplication1\Class1.cs(4): 类型或命名空间名称“Tcp”在类或命名空间“System.Runtime.Remoting.Channels”中不存在(是否缺少程序集引用?)怎么解决?
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Net;
using System.Net.Sockets;
namespace ConsoleApplication1
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
///
[STAThread]
static void Main(string[] args)
{
TcpChannel chan = new TcpChannel(8085);
ChannelServices.RegisterChannel(chan);
RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType("RemotingSamples.HelloServer,object"), "SayHello", WellKnownObjectMode.SingleCall);
System.Console.WriteLine("点击 <enter> 退出...");
System.Console.ReadLine();
return 0;
}
}
}
编译:
C:\Documents and Settings\Administrator\桌面\ConsoleApplication1\Class1.cs(4): 类型或命名空间名称“Tcp”在类或命名空间“System.Runtime.Remoting.Channels”中不存在(是否缺少程序集引用?)怎么解决?
解决方案 »
- 贝赛尔曲线问题
- 如何实现 VS IDE中 查找所有引用 这样的功能
- 如何winfrom中datagridview中的ComboBox进行值的绑定读取
- 请问怎样在C#的WinForm中连接有密码的电脑的SQL数据库
- 菜鸟问题:XML节点读取
- c#与API函数
- 当我把Listview的ListViewcheckes=true的时候,如何遍历打勾的ListviewItem项呢??
- 【求助】关于JS的异歩调用问题
- 关于AutoPostBack的小问题。
- 关于向dataset中插入空行的问题——如何临时禁止约束生效!
- 如何在web上将多个大文件同时上传至oracle数据库存储
- 寻求B2C网站项目兼职ASP.NET+C#(仿Duwamish)一名
不知道是我们太笨,还是。net太笨,哈哈
在“解决方案资源管理器”引用“system.runtime.remoting”之后,
上述的问题就解决了!!!
哎俺太笨!