473,657 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Requesting web page from SSL site fails

I am using HttpWebRequest to request a page from my own site. It works great
when the site isn't running under SSL, but it fails when I run I turn on
SSL.

I am assuming I need to include some sort of certificate with the request?
Is this the certificate that is normally included in the browser? We are
using a standard site certificate from Verisign (which resides on the
server), what do I need to put in my client?

Nov 19 '05 #1
4 1399
Hi Tim:

When you hit the site with a browser - is there any sort of warning dialog
about the certificate?

Generally, a client side certificate is not required for an SSL site (although
some certainly do require one), but if the server certificate has even the
smallest of problems (like the machine's clock is set wrong and the client
thinks the certificate has expired) it will be a failure.

Do you have a specific error message from your program to work from?

--
Scott
http://www.OdeToCode.com/blogs/scott/
I am using HttpWebRequest to request a page from my own site. It works
great when the site isn't running under SSL, but it fails when I run I
turn on SSL.

I am assuming I need to include some sort of certificate with the
request? Is this the certificate that is normally included in the
browser? We are using a standard site certificate from Verisign
(which resides on the server), what do I need to put in my client?

Nov 19 '05 #2
The main reason SSL requests with HttpWebRequest fail is something wrong
with the server certificate (name on cert doesn't match the hostname
requested by client, cert is revoked, cert is expired, cert is not trusted).
It is less likely that you need a client certificate, although the server
may be requesting one. You should be able to find that out with a web
browser or something.

If there is an issue with the certificate, you can either fix the problem or
implement a custom ICertificatePol icy that will allow you to override any
objections to the server's certificate and allow the request. The samples
are in the SDK docs for ICertificatePol icy.

Joe K.

"Tim Mavers" <we*****@hotmai l.com> wrote in message
news:4P******** ************@gi ganews.com...
I am using HttpWebRequest to request a page from my own site. It works
great when the site isn't running under SSL, but it fails when I run I turn
on SSL.

I am assuming I need to include some sort of certificate with the request?
Is this the certificate that is normally included in the browser? We are
using a standard site certificate from Verisign (which resides on the
server), what do I need to put in my client?

Nov 19 '05 #3
"Joe Kaplan (MVP - ADSI)" <jo************ *@removethis.ac centure.com> wrote
in message news:ud******** ******@TK2MSFTN GP15.phx.gbl...
The main reason SSL requests with HttpWebRequest fail is something wrong
with the server certificate (name on cert doesn't match the hostname
requested by client, cert is revoked, cert is expired, cert is not
trusted). It is less likely that you need a client certificate, although
the server may be requesting one. You should be able to find that out
with a web browser or something.


Yes, that was the problem, there as an issue with the cert on the server.
We were getting warning dialogs about "cert not being fully trusted", but
accepting "yes" would work fine (from the browser). However, apparently the
API itself will default to reject this.

Once we straightened out the cert, HttpWebRequest works fine.

Thanks for all the help.
Nov 19 '05 #4
BTW, you can control that behavior in .NET code by implementing your own
custom ICertificatePol icy class and setting that on the ServicePointMan ager,
but fixing the cert is always best.

Joe K.

"Tim Mavers" <we*****@hotmai l.com> wrote in message
news:VN******** ************@gi ganews.com...
"Joe Kaplan (MVP - ADSI)" <jo************ *@removethis.ac centure.com> wrote
in message news:ud******** ******@TK2MSFTN GP15.phx.gbl...
The main reason SSL requests with HttpWebRequest fail is something wrong
with the server certificate (name on cert doesn't match the hostname
requested by client, cert is revoked, cert is expired, cert is not
trusted). It is less likely that you need a client certificate, although
the server may be requesting one. You should be able to find that out
with a web browser or something.


Yes, that was the problem, there as an issue with the cert on the server.
We were getting warning dialogs about "cert not being fully trusted", but
accepting "yes" would work fine (from the browser). However, apparently
the API itself will default to reject this.

Once we straightened out the cert, HttpWebRequest works fine.

Thanks for all the help.

Nov 19 '05 #5

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

Similar topics

5
1471
by: Sens Fan Happy In OH | last post by:
I am currently working on a webpage that requires some rather extraordinary things to be done to it and I am not sure how best to go about doing this so I hope possibly someone can help me out on this. The page needs to look as much like a particular sales flyer as possible. This flyer has two dragonflies in the upper left and right corners of the page. At the bottom of the page then is a very elaborate JPG of a lilypads and various...
1
1242
by: Charles A. Lackman | last post by:
Hello, I have made an aspx web application that is using Forms Authentication. Each unsecure page has a custom user control on it that will allow the visitor to login and enter secure pages. The question I have is within the Web.Config file. under <authentication mode="Forms"> there is "LOGINURL" because there is not a specific LoginPage I want the user to be redirected back to the requesting page they attempted the logjn from. Is...
12
1529
by: Tom | last post by:
Hi everyone, I don't know if anyone can help me, I've got roughly 25 forms in a site, with between 10 and 70 fields on each form. Now, these fields need to be inserted into a DB, each form has it's own table and each column is named the same as it's corresponding form field. Make sense? My question is, is there a quicker way of constructng my SQL UPDATE
1
2131
by: prabhupr | last post by:
Hi Folks I have created a web-site which has ASPX pages and HTM pages. When I load the HTM page the site gets loaded, but fails to load ASPX page with error as follows The page cannot be found The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
1
1568
by: Aaron | last post by:
Not sure if this is the best spot to post this question, but I am not going to pay money to ask an installation question.... Anyways I am trying to install C# standard 2003 and it analyzes the system and then say I need to install some prerequisite stuff. So I click on the link that says that and then I get a message the that some application is already requesting a reboot. This is a brand new Compaq laptop purchased yesterday. I have...
6
4866
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
0
1087
by: Frederic Rentsch | last post by:
Some time ago I had managed to upload a small package to the Cheese Shop using the data entry template. Uploading is in two steps: first the text then the package file. When I had a new version it went like this: The new text made a new page, but the new file went to the old page. The old page then had both files and all attempts at uploading the new file to the new page failed with the error message that a file could not be uploaded if it...
11
3515
by: emailus | last post by:
I am webmaster for the domain <www.alpha1.org.au>. Not being an expert in html, I take advantage of my domain Registrant's web building tool, 'Instant Website'. This tool is provided as part of the fee I pay for web hosting. 'Instant Website' provides the option of having your opening page as a Flash Page, which you'll see if you visit <www.alpha1.org.au>. Well, you'll see it if you visit from a Windows machine. For some reason, when...
232
13242
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first set of examples, after decoding the HTML FORM contents, merely verifies the text within a field to make sure it is a valid representation of an integer, without any junk thrown in, i.e. it must satisfy the regular expression: ^ *?+ *$ If the...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.