懂得把remoting写在windows服务中的进来帮我看一下
我写了windows服务程序做为服务端
protected override void OnStart(string[] args)
{
th = new Thread(new ThreadStart(ServiceThread));
th.Start();
//RemotingConfiguration.Configure("SimpleServer.exe.config");
}
void ServiceThread()
{
RemotingConfiguration.Configure("SimpleServer.exe.config");
}
客户端没法正常运行。
如果服务端写成控制台程序
static void Main(string[] args)
{
RemotingConfiguration.Configure("SimpleServer.exe.config");
Console.WriteLine("Press return to exit");
Console.ReadLine();
}
客户端就正常。
请问什么原因???