T
tom
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.X509Certificate
(fcert, "certPassPhrase"))
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.X509Certificate
(fcert, "certPassPhrase"))