Solved

Viewing image in a secure directory

Posted on 2012-03-17
3
144 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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:…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now