display images from remote site

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • csihosting
    New Member
    • Feb 2009
    • 2

    display images from remote site

    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.



    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()
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Ask if they will host a template page for you so that you can retain your navigation, but don't have to host the images?

    Another option would be to have the thumb library on your site, with a link opening the full image on their site in a new window?

    Comment

    • csihosting
      New Member
      • Feb 2009
      • 2

      #3
      Thanks for the reply, but neither of those things are really an option. Any other ideas? If I have to, I'll setup the script to download the images on demand, then delete them every month to save space on my server. So my other question is how do I get asp.net (vb) to download images and save them as a jpeg while sending credentials at the same time? Thanks

      Comment

      Working...