Solved

Viewing image in a secure directory

Posted on 2012-03-17
3
153 Views
Last Modified: 2012-03-18
Hello all,

I am trying to display an image on my PictureBox1 which is retrieved from a secure directory on my server. On Firefox, I have to add my username/password to view the image. How would I add my username and password to make my application show on it's form the image on picturebox1?

This is what I have:

    Dim s As String
        s = "http://3xx.xxx.xx.xxx:81/" & lblvalue.Text & ".jpg"
        PictureBox1.ImageLocation = s
0
Comment
Question by:MissNicola
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 200 total points
ID: 37733801
You have to download it to a local file and then use it.

My.Computer.Network.DownloadFile method takes the username and password parameters

http://msdn.microsoft.com/en-us/library/ack30t8y(v=vs.80).aspx
0
 

Author Closing Comment

by:MissNicola
ID: 37734887
Thanks, I have use the  Dim req As Net.HttpWebRequest = Net.HttpWebRequest.Create(s) method and it worked as well. Do you think there's a difference in performance between these two methods?

Cheeres
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37735060
I am not sure about performance difference.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question