Home > Net >  C # programming: want to realize remote computer read TXT file, display in the textBOX
C # programming: want to realize remote computer read TXT file, display in the textBOX

Time:09-18

Site has A record of A computer storage products, assuming that path for IP1.2.3.4/A, TXT format, is to achieve function: in the remote path to A folder on the computer to find the specified eee. TXT file, and the content displayed in the textbox1, how do you write the code? Novice deliver a great god, thank you very much!

CodePudding user response:

Refer to http://blog.csdn.net/xuexue_wang/article/details/11371849

CodePudding user response:

Ok, I will consider, thank you

CodePudding user response:

reference 1st floor xdashewan response:
http://blog.csdn.net/xuexue_wang/article/details/11371849

The remote copy to local is said above, I just want to find out need to file, access to content is displayed in my text box,

CodePudding user response:

reference t15032286291 reply: 3/f
the remote is copied to the local is said above, I just want to find out need to file, access to content is displayed in my text box,

Read and write the remote are generally choose to download, if you just want to read, you can also refer to the http://www.cnblogs.com/sxw117886/p/5619744.html

CodePudding user response:

Ah, ah, or testing won't do,,

CodePudding user response:

If can be mapped, you put the remote mapped to your local to a hard disk, such as local operating

CodePudding user response:

Remote computer set up FTP site, and then access the FTP read display,

CodePudding user response:

Have any about code let me reference?


I really don't know you how great god is tempered,,,,,,,,,

CodePudding user response:

Connection first, then read the Shared folder
Status=connectState (@ "\ \ 192.168.1.9," @ "Administrator", "");
FileName=@ \ \ "192.168.1.9 \ Data \ 2020-03 \ data2020-03-16 12-53-01. CSV";

CodePudding user response:

It says a lot of methods, I say you a can be released to the IIS, then through the WebClient. DownloadData read content

CodePudding user response:

To read like a Shared folder can be as local use

CodePudding user response:

1. If there is no mandatory requirements for safety,
Can through the net use command on the remote machine folder is mapped to a local
This is equivalent to read a local file

2. If the requirements for security, are not allowed to share files,
It involves network communications,

CodePudding user response:

Build a web or FTP, access, it is not problem,

CodePudding user response:

The most simple and convenient way is remote mapped to your local into a dish

CodePudding user response:

Write good, but is a MessageBox, you can modify the HTML code is as follows:
 
Using System. IO;
using System.Windows.Forms;

The class Test
{
Public static void Main ()
{
Var strContent=File. ReadAllText (" \ \ \ \ \ \ 1. 2. A \ \ eee TXT ");
MessageBox. Show (strContent);
}
}

CodePudding user response:

The remote computer use WCF
  •  Tags:  
  • C #
  • Related