Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How can this be possible - Part 2

How can this be possible - Part 2

Scheduled Pinned Locked Moved ASP.NET
sysadmincsharpasp-netdatabasequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    v1i9n6o7d
    wrote on last edited by
    #1

    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?

    P 1 Reply Last reply
    0
    • V v1i9n6o7d

      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?

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      What user context are you running the application under?

      V 1 Reply Last reply
      0
      • P Paddy Boyd

        What user context are you running the application under?

        V Offline
        V Offline
        v1i9n6o7d
        wrote on last edited by
        #3

        I have identity impersonate="true" in web.config. In the Directory security I have Anonymous Access and Windows Authentication turned on.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups