Click here to Skip to main content
15,894,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

In my program I have Picture box control called Slika0.

This picture box is used for showing image downloaded from the internet server to user. Inside the program code I used simple url adress of the image as picture box image location.

Slika0.ImageLocation = "https://s.yimg.com/zz/combo?a/i/us/we/52/32.gif";


The problem is that when I start program I get this message :

" The underlying connection was closed : Could not estabilish trust relationship for the SSL/TLS secure chanel ".

When I make simple copy paste url into web browser adress bar, everything works perfectly, I've got the image in browser.

What could be the problem ?

What I have tried:

I have made question abouth this problem on yahoo answers site but there is still no adequate answer.

All the best,
Željko Perić
Posted
Comments
Karthik_Mahalingam 5-Feb-17 4:30am    
i tried your code, it works fine..
is the error because of the image url or someother?
Perić Željko 5-Feb-17 11:32am    
Url is valid.
Karthik_Mahalingam 5-Feb-17 22:24pm    
create an empty form and add only a picturebox cotrol and try to assign the image to it.
Perić Željko 7-Feb-17 14:27pm    
Thanks for advice, I have done that and there is no image inside picture box for the url :
https://s.yimg.com/zz/combo?a/i/us/we/52/32.gif

But ! When I have changed url :
https://codeproject.global.ssl.fastly.net/App_Themes/CodeProject/Img/logo250x135.gif

Code project logo appears inside picture box as it should be.

I have made conclusion that there is something wrong with server where is saved image that I want to download. So I have downloaded all images to my computer simply by copy/paste from web browser and now I can use them inside my program. This is stupid solution but it works. By the way images are not copywrite protected :)

Thanks to Karthik for help in resolving this issue,
And all the best,
Željko Perić
Karthik_Mahalingam 7-Feb-17 21:15pm    
Cool

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900