How can this be possible - Part 2
-
Read through the scenario.
client A wants to read files from another client B present in the same network. But this reading should be done through a ASP.NET web application . In other words a client should be able to read a text file present on another client in the same network.
This scenario would be applicable in an intranet application. The thing
to note is that the path of client B would be present in the server. The client A would pick the path from the server and navigate automatically to client B, hunt down the necessary folder and read the text files and store the necessary data in a database.
This was my earlier post yesterday. I intend to carry this forward for gathering more insight. Here is the code on which I am working
protected void Button1_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); StreamReader sr = new StreamReader(@"\\Pc4\C$\NDP\Test1.csv"); string line; while((line = sr.ReadLine()) != null) { Label1.Text += line; } }
The client A when he executes this code is intending to access another client B (Here it is PC4 in the same domain). In my web.config I have . The code resides on server in Win 2K3 box. This program works fine when I am executing it from the server, but fails from a client. Any pointers or are further clarifications required? -
Read through the scenario.
client A wants to read files from another client B present in the same network. But this reading should be done through a ASP.NET web application . In other words a client should be able to read a text file present on another client in the same network.
This scenario would be applicable in an intranet application. The thing
to note is that the path of client B would be present in the server. The client A would pick the path from the server and navigate automatically to client B, hunt down the necessary folder and read the text files and store the necessary data in a database.
This was my earlier post yesterday. I intend to carry this forward for gathering more insight. Here is the code on which I am working
protected void Button1_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); StreamReader sr = new StreamReader(@"\\Pc4\C$\NDP\Test1.csv"); string line; while((line = sr.ReadLine()) != null) { Label1.Text += line; } }
The client A when he executes this code is intending to access another client B (Here it is PC4 in the same domain). In my web.config I have . The code resides on server in Win 2K3 box. This program works fine when I am executing it from the server, but fails from a client. Any pointers or are further clarifications required?What user context are you running the application under?
-
What user context are you running the application under?