• 大小: 139KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-10
  • 语言: C#
  • 标签: .net  remoting  c/s版  

资源简介

很简单的一个东西 感觉有点用 就发上来分享 .net2.0 remoting C# ===== 这个资源的client端里边那个RemotingObject.cs删除 否则运行有错 谢谢

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using Remotebase;
namespace RemoteServer
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        TcpChannel channel;
        private void btnStart_Click(object sender EventArgs e)
        {
            if (channel == null)
            {
                channel = new TcpChannel(8080);
                ChannelServices.RegisterChannel(channel false);
                RemotingConfiguration.RegisterWellKnownServiceType(typeof(Sampleobject) “ChatRoom“ WellKnownobjectMode.Singleton);

                lblStatus.Text = “Running...“;
                btnStart.Enabled = false;
                btnStop.Enabled = true;
            }
        }

        private void btnStop_Click(object sender EventArgs e)
        {
            if (channel != null)
            {
                ChannelServices.UnregisterChannel(channel);
                channel = null;
                lblStatus.Text = “Stopped.“;
                btnStart.Enabled = true;
                btnStop.Enabled = false;
            }
        }

    }
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      16384  2009-08-17 18:32  RemotingClient\RemotingClient\bin\Debug\Remotebase.dll

     文件      13824  2009-08-17 18:32  RemotingClient\RemotingClient\bin\Debug\Remotebase.pdb

     文件      24576  2010-09-03 10:17  RemotingClient\RemotingClient\bin\Debug\RemotingClient.exe

     文件      56832  2010-09-03 10:17  RemotingClient\RemotingClient\bin\Debug\RemotingClient.pdb

     文件       5632  2005-09-23 06:56  RemotingClient\RemotingClient\bin\Debug\RemotingClient.vshost.exe

     文件      16384  2009-08-17 18:32  RemotingClient\RemotingClient\bin\Release\Remotebase.dll

     文件      13824  2009-08-17 18:32  RemotingClient\RemotingClient\bin\Release\Remotebase.pdb

     文件      24576  2009-08-17 20:04  RemotingClient\RemotingClient\bin\Release\RemotingClient.exe

     文件      28160  2009-08-17 20:04  RemotingClient\RemotingClient\bin\Release\RemotingClient.pdb

     文件       2876  2010-09-03 09:57  RemotingClient\RemotingClient\frmChatWin.cs

     文件       5848  2009-08-17 18:00  RemotingClient\RemotingClient\frmChatWin.Designer.cs

     文件       6189  2009-08-17 18:00  RemotingClient\RemotingClient\frmChatWin.resx

     文件       1852  2009-12-04 12:07  RemotingClient\RemotingClient\frmLogin.cs

     文件       4197  2009-12-04 12:07  RemotingClient\RemotingClient\frmLogin.Designer.cs

     文件       5814  2009-12-04 12:07  RemotingClient\RemotingClient\frmLogin.resx

     文件        966  2010-09-03 09:45  RemotingClient\RemotingClient\obj\Debug\RemotingClient.csproj.GenerateResource.Cache

     文件      24576  2010-09-03 10:17  RemotingClient\RemotingClient\obj\Debug\RemotingClient.exe

     文件        180  2009-08-17 18:35  RemotingClient\RemotingClient\obj\Debug\RemotingClient.frmChatWin.resources

     文件        180  2009-12-04 12:07  RemotingClient\RemotingClient\obj\Debug\RemotingClient.frmLogin.resources

     文件      56832  2010-09-03 10:17  RemotingClient\RemotingClient\obj\Debug\RemotingClient.pdb

     文件        180  2009-08-17 18:35  RemotingClient\RemotingClient\obj\Debug\RemotingClient.Properties.Resources.resources

     文件       2585  2009-12-04 12:07  RemotingClient\RemotingClient\obj\Debug\ResolveAssemblyReference.cache

     文件        908  2009-08-17 18:30  RemotingClient\RemotingClient\obj\Release\RemotingClient.csproj.GenerateResource.Cache

     文件      24576  2009-08-17 20:04  RemotingClient\RemotingClient\obj\Release\RemotingClient.exe

     文件        180  2009-08-17 18:35  RemotingClient\RemotingClient\obj\Release\RemotingClient.frmChatWin.resources

     文件        180  2009-08-17 18:35  RemotingClient\RemotingClient\obj\Release\RemotingClient.frmLogin.resources

     文件      28160  2009-08-17 20:04  RemotingClient\RemotingClient\obj\Release\RemotingClient.pdb

     文件        180  2009-08-17 18:35  RemotingClient\RemotingClient\obj\Release\RemotingClient.Properties.Resources.resources

     文件       2621  2009-08-17 18:35  RemotingClient\RemotingClient\obj\Release\ResolveAssemblyReference.cache

     文件       6615  2010-09-03 10:18  RemotingClient\RemotingClient\obj\RemotingClient.csproj.FileListAbsolute.txt

............此处省略71个文件信息

评论

共有 条评论