473,396 Members | 1,833 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,396 software developers and data experts.

Automating access to a HTTPS website

Hi all,

I'm facing the following problem. I am trying to programmatically
retrieve data from a website that needs a login through HTTPS.
Originally, as I am not familiar with HTTPS and SSL, i tried to capture
web browser requests with a HTTP sniffer, and then send the same
requests with my application, using System.Net.Sockets.Socket.

And, as you probably have guessed, it didnt work, because, as I just
came to know, the client and the server perform a handshake over TCP,
thats not HTTP based and thus can't be captured by my HTTP sniffer.

So, any ideas are greatly appreciated, because I have no idea what
shall I do. Start reading the HTTPS and SSL spec perhaps? This is a
way, but I am like the idea of finding an easier solution, maybe a
framework for accessing and parsing web sites? Or utility for taking
over a browser and employing it to do my work? Anything else?

Please excuse me if I am asking questions that have been around for
ages, but currently my searches haven't led me to relevant answers.
Thanks everybody

Apr 8 '06 #1
2 1579
Hi Stefan,

You should be able to do this with the Webclient class:

http://msdn2.microsoft.com/en-us/lib...rs(VS.80).aspx

It allows you to set the credentials as it requests the resources:

http://msdn2.microsoft.com/en-us/lib...ls(VS.80).aspx

Ken
Microsoft MVP [ASP.NET]
"Stefan Kiryazov (MCAD)" <ch***@bulgaria.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Hi all,

I'm facing the following problem. I am trying to programmatically
retrieve data from a website that needs a login through HTTPS.
Originally, as I am not familiar with HTTPS and SSL, i tried to capture
web browser requests with a HTTP sniffer, and then send the same
requests with my application, using System.Net.Sockets.Socket.

And, as you probably have guessed, it didnt work, because, as I just
came to know, the client and the server perform a handshake over TCP,
thats not HTTP based and thus can't be captured by my HTTP sniffer.

So, any ideas are greatly appreciated, because I have no idea what
shall I do. Start reading the HTTPS and SSL spec perhaps? This is a
way, but I am like the idea of finding an easier solution, maybe a
framework for accessing and parsing web sites? Or utility for taking
over a browser and employing it to do my work? Anything else?

Please excuse me if I am asking questions that have been around for
ages, but currently my searches haven't led me to relevant answers.
Thanks everybody

Apr 9 '06 #2
Thus wrote Stefan,
Hi all,

I'm facing the following problem. I am trying to programmatically
retrieve data from a website that needs a login through HTTPS.
Originally, as I am not familiar with HTTPS and SSL, i tried to
capture web browser requests with a HTTP sniffer, and then send the
same requests with my application, using System.Net.Sockets.Socket.

And, as you probably have guessed, it didnt work, because, as I just
came to know, the client and the server perform a handshake over TCP,
thats not HTTP based and thus can't be captured by my HTTP sniffer.


Good idea, flawed execution ;-)

In order to capture HTTPs traffic, it's easiest to use a browser-side plug-in
that works on the request after decryption, e.g. LiveHttpHeaders.

For the implementation in .NET, you can use HttpWebRequest/Response or WebClient
from the System.Net namespace. You might want to check out the HtmlAgilityPack
to process HTML content.

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Apr 10 '06 #3

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

Similar topics

7
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
5
by: Hatim Ali | last post by:
Hello folks, I've integrated my ASP.NET website with a portal on web. My website opens in a frame provided by the web portal. The portal uses https protocol. Now when i open my website IE...
19
by: Mark Gross | last post by:
I am attempting to programatically drive a Lotus Notes web application from a VB.NET database application (who wants to rekey information in one database into someone else's web page for entry to...
4
by: Supa Hoopsa | last post by:
I am in the process of rewriting an MS Access application (access front end with SQL 2k database) in VB.NET and one of the things I would like to do is link in to the compiled Access ADE so that I...
1
by: phil.jacobs | last post by:
Hi there, I am very stuck and have tried everything on this one! I am trying to get to an https website and cannot work out how to logon. When I log on manually, I have to enter username and...
0
by: gpl666666 | last post by:
I use Microsoft Access to create a webpage I publish this webpage to our company server, it gives two messages when I open the webpage, one is: "This website uses a data provider that may be...
0
by: flowk1337 | last post by:
I have a grid view with a datatable as it's datasource in VB. I can successfully import the data into the grid view and see it. I have my website set up so that the user can edit all fields at once...
2
by: chutney | last post by:
Dear all, please excuse the fact that this is not an explicit problem I have, but more of a general query. I have an Access database (2003) with a load of contact details in it. Including various...
9
by: LVP | last post by:
Hello, What are the ways to switch from http to https. Is there a way internal to IIS 6.0 or x.xx? Some configuration? Is there a way via DNS? I have seen Scripts in VB and JavaScript ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.