I would like to dispaly some images from a remote site (I have permission) on my asp.net page. The site required authentication. How do I retrieve the images and send the credentials without the user being prompted for it at page load?
I was hoping to avoid downloading the images and saving them locally. There's potential thousands of pictures. I guess I could write a clean up script to delete the downloaded pictures month and an if file exists statement. Any other ideas?
Edit:
I should also note that the url for the images is like this:
http://*******.com/********&ID=2713187:1
There must be away to supply user credentials when requesting the image (which is where I'm having the problem) The following code works to retrieve other information from the same site (but different page). So how do I get this to work for the image? Without downloading it.
I was hoping to avoid downloading the images and saving them locally. There's potential thousands of pictures. I guess I could write a clean up script to delete the downloaded pictures month and an if file exists statement. Any other ideas?
Edit:
I should also note that the url for the images is like this:
http://*******.com/********&ID=2713187:1
There must be away to supply user credentials when requesting the image (which is where I'm having the problem) The following code works to retrieve other information from the same site (but different page). So how do I get this to work for the image? Without downloading it.
Code:
Dim request As HttpWebRequest = TryCast(WebRequest.Create(url), HttpWebRequest) request.Credentials = New NetworkCredential(username, password) Dim docresponse As WebResponse = request.GetResponse() Dim responsestream As Stream = docresponse.GetResponseStream()
Comment