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

HTTPS connection...any ideas?

YYZ
I'm trying to write code to connect to a place on the net, send them an
xml file, and get one in return. I've pieced together the following
code, and was wondering if anyone can tell me if I'm on the right track
or not.

In particular, if anyone knows, am I supposed to the ContentType to
something like "xml"?

Dim netCred As New System.Net.NetworkCredential(_
"username", "password")
Dim cCache As New System.Net.CredentialCache

cCache.Add(New Uri(_
"https://xxx.xxx.com/cgi-bin/program.exe"), _
"Basic", netCred)
' Now, we need an actual request object,
' and set some properties of it...
Dim request As System.Net.HttpWebRequest
request = System.Net.HttpWebRequest.Create( _
"https://xxx.xxx.com/cgi-bin/program.exe")
request.Credentials = cCache
request.Method = "POST"

' Do we need to set content type to something like xml?
' How do we do that?
request.ContentType = "???"

' then how do we send it?
Dim writer As System.IO.StreamWriter
writer = New System.IO.StreamWriter(request.GetRequestStream)
writer.Write("The XML Document")
writer.Close()

' Now we need to read what they responded with...
' is this asynchronous?
Dim resp As System.Net.HttpWebResponse
resp = request.GetResponse()
Dim reader As New System.IO.StreamReader(resp.GetResponseStream())
Dim sReponse As String = reader.ReadToEnd()
reader.Close()

Thanks for any pointers that anyone can give me -- I'm completely
flying blind here...

Matt

Feb 9 '06 #1
0 894

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...
2
by: Mark Delon | last post by:
Hi, i want to log via python script to https page: 'https://brokerjet.ecetra.com/at/' # But it does not work. I am using following code(see below)
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...
1
by: Fenno | last post by:
I am creating an ASP.NET project that contains some pages that require a secure connection via HTTPS/SSL. The problem I have is how do you maintain session data when switching between HTTPS and...
6
by: Arnaud | last post by:
Hi, I'm trying to translate an asp application in a php way, i'm using Php 4.3.x. I'm going to try an asp newsgroup too, but as it mainly deals with Php, I would like to submit you my probem :...
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...
2
by: Greg Wood | last post by:
As a new member, I hope I am posting correctly. Bear with me if not ! I found a posting by Earle Oxner that very closely matches the situation we are in. Sadly, there were no replies to his post,...
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,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.