All along, want to use local remote operation of the server, a bit like a Trojan horse program, but I use here is to achieve rapid build station, convenient management site, control server IIS, Web files.
To develop such a program, first, you need to configure the debugging environment, I choose two computers, one as server, and the other as the client.
As a result, a win2003 is built with VMware as the server
Use the local computer Win07 as the client.
First, the TCP server.
Private Itxserver ser = null; private void btnStart_Click (object sender, EventArgs e) {try {ser = txstart.startserver (int). Parse (Textbox_port. Text)); Ser. Acceptstring + = new Txdelegate<ipendpoint, string> (acceptstring); Ser. Acceptbyte + = new Txdelegate<ipendpoint, byte[]> (acceptbytes); Ser. Connect + = new txdelegate<ipendpoint> (connect); Ser.datesuccess + = new txdelegate<ipendpoint> (datesuccess); Ser. disconnection + = new Txdelegate<ipendpoint, string> (disconnection); Ser. Engineclose + = new Txdelegate (engineclose); Ser. Enginelost + = new txdelegate<string> (enginelost); Ser. buffersize = 12048; Ser. FileLog = "C:\\Test.txt"; Ser. StartEngine (); this.btnStart.Enabled = false; } catch (Exception Ex) {MessageBox.Show (ex.message); } }
Programs for developing CLIENT,SERVER,C/S architectures in C #