Retrieving a file a web server via another web server
-
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 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
Check out WebClient.OpenRead.
Ian Mariano - http://www.ian-space.com/
"We are all wave equations in the information matrix of the universe" - me -
Check out WebClient.OpenRead.
Ian Mariano - http://www.ian-space.com/
"We are all wave equations in the information matrix of the universe" - me