Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Upload ZIP file to an HTTPS website (Secure File Transport) using .NET

Reply
Thread Tools

Upload ZIP file to an HTTPS website (Secure File Transport) using .NET

 
 
tom
Guest
Posts: n/a
 
      11-17-2006
What I want to do is upload a zip file to an https website. The site
itself uses secure File transport. Now webclient has the simplicity to
upload a file, but I cannot attach the neccessary cert to connect. If
I use httpwebrequest I can successfully attach the cert but then what?
Any ideas how to send this zip file over?

Here is the code I started to play with....

Dim wfClient As WebClient = New WebClient()
Dim uri As String = "https://sft.site.com/"
Dim fname As String = "c:\test.zip"
Dim fcert As String = "C:\cert.P12"
wfClient.UploadFile(uri, fname) 'When I run this I cant get past the
security (cert) stuff

'This successfully attaches a cert to a httpwebrequest but I don't know
how to send the file?
Dim myReq As HttpWebRequest = WebRequest.Create(uri)
myReq.Method = "POST"
myReq.ClientCertificates.Add(New
System.Security.Cryptography.X509Certificates.X509 Certificate
(fcert, "certPassPhrase"))

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possibility to add a zip-file to a new zip-file with "add to zip" (right-click) ?? erikkie@casema.nl Computer Support 4 06-26-2006 12:18 AM
Re: Add file to zip, or replace file in zip Chris Lambacher Python 0 06-01-2006 09:39 PM
Add file to zip, or replace file in zip majj81 Python 0 05-31-2006 07:10 AM
Add file to zip, or replace file in zip abcd Python 7 05-01-2006 10:19 PM
Using scons zip builder to create zip Chris Becker Python 0 10-18-2005 05:35 PM



Advertisments