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. Retrieving a file a web server via another web server

Retrieving a file a web server via another web server

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomsysadmin
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.
  • N Offline
    N Offline
    nemo
    wrote on last edited by
    #1

    I have run into the situation where I need to retrieve a file from another web server with ASP.Net. The scenario is: a user visits an ASP.Net page on server A, the page contains a form where the user types in a fully qualified path to a binary file that lives on another web server(server B). ie http:\\www.dingo.com\myinfo.dat. The web server(A) needs to retrieve the file from web server(B) and do some processing on it to relay back to the user. Can I use urldownloadtofile in my C# codebehind to get the file or is there a simplier solution. Any input is appreciated. :-) Thanks

    I 1 Reply Last reply
    0
    • N nemo

      I have run into the situation where I need to retrieve a file from another web server with ASP.Net. The scenario is: a user visits an ASP.Net page on server A, the page contains a form where the user types in a fully qualified path to a binary file that lives on another web server(server B). ie http:\\www.dingo.com\myinfo.dat. The web server(A) needs to retrieve the file from web server(B) and do some processing on it to relay back to the user. Can I use urldownloadtofile in my C# codebehind to get the file or is there a simplier solution. Any input is appreciated. :-) Thanks

      I Offline
      I Offline
      ian mariano
      wrote on last edited by
      #2

      Check out WebClient.OpenRead.

      Ian Mariano - http://www.ian-space.com/
      "We are all wave equations in the information matrix of the universe" - me

      N 1 Reply Last reply
      0
      • I ian mariano

        Check out WebClient.OpenRead.

        Ian Mariano - http://www.ian-space.com/
        "We are all wave equations in the information matrix of the universe" - me

        N Offline
        N Offline
        nemo
        wrote on last edited by
        #3

        Thanks Ian, that is exactly what I am looking for. When in doubt, it always pays to ask. :-)

        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