473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

https connection problem

Hello,

I'm trying to connect a https server with an application.

but i catch this error

"The connection was closed. Unable to connect to the Remote server"

I want to connect a secure server on internet.
I have to pass trough a proxy to go on the internet.

Here is my code.

System.Net.ServicePointManager.CertificatePolicy = new
TrustAllCertificatesPolicy();

HttpWebRequest webRequest = (HttpWebRequest)
WebRequest.Create("https://toto.com");
webRequest.KeepAlive = false;
webRequest.Method = "GET";
webRequest.Proxy = new WebProxy("xxxx", 8080);
webRequest.Proxy.Credentials = new NetworkCredential("myLogin", "myPass");
// login and pass for the proxy
CredentialCache wrCache = new CredentialCache();
wrCache.Add(new Uri("toto.com"), "Basic", new NetworkCredential("TOTO",
"TITI"));
webRequest.Credentials = wrCache;
HttpWebResponse response = (HttpWebResponse) webRequest.GetResponse();
response.Close();
I don't know why he can connect to the server
thanks for the repsonse.
Nov 17 '05 #1
0 3135

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at...
22
by: Bloke | last post by:
Hi all. Some time ago (years) I had a script on Python 2.2 that would retieve a HTTPS web site. I used python22-win32-ssl.zip to handle the SSL aspect and it worked wonderfully. I am...
4
by: michaelparkin | last post by:
Hi, Sorry to post what might seem like a trivial problem here, but its driving me mad! I have a simple https client that uses httplib to post data to a web server. When I post over http &...
1
by: Ashutosh Bhalerao | last post by:
Hi all, I am trying to write a VB.Net application which communicates over SSL with an IIS server. I have got a temporary certificate from Verisign and installed it on IIS. I am using...
2
by: MarkAurit | last post by:
I have a web service Im using on a machine via http in a dmz that works file. Im now attempting to use it in a second server, this one using https. When I attempt to add the Web Reference in vs.net...
4
by: Jason P | last post by:
Basically we have a web method with a dynamic URL. The client is developed in C++ and I've been using the webReference.SetUrl( "http://test.example.com..." ) method successfully with various web...
0
by: mahesh anasuri | last post by:
Hi all, I am new to this mailing list. Thankful if any one is using curl/linux version to and worked on Https. I have created certificates (PEM format) for client and server using openSSL. I...
0
by: NoaGross | last post by:
Hi, I'm relly new in java and I have a problem. I'm using java applet. When using http all ok, but when trying to use https i get: Java Plug-in 1.5.0_10 Using JRE version 1.5.0_10 Java...
5
by: Chuck Anderson | last post by:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC (Windows XP). One of the scripts that I run daily needs to access a secure URL (https://..............). When I am running Php4,...
2
by: bizt | last post by:
Hi, I have a page that makes many XmlHttpRequest requests from a single page. This works fine but I need some requests to be made over a secure connection. To my understanding, when setting the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.