P
Peter Sedman
Hi,
I'm trying to write a ASP.NET application that calls another ASP.NET
application using the HttpWebRequest class.
I need to secure the communicate with Client Certificates. I'm adding a
certificate to the request but get a 403 error when running.
I've read that this was a problem with the ASPNET process not being able to
access the certificate store and that a hot fix is available but it will be
part of the .NET Framework 1.0 service pack
(http://support.microsoft.com/?id=817854). We're running .NET Framework
1.1, presumably it's part of this?
Here's my code, I get a 403 error when it hits the req.GetRequestStream
line:
Private Sub PostData(ByVal req As HttpWebRequest, ByVal data As Byte(),
ByVal CertFileName as string)
Dim x509Cert As X509Certificate =
X509Certificate.CreateFromCertFile(CertFileName)
req.ClientCertificates.Add(x509Cert)
' Open data stream for the request and write data (SEND) and close
stream
Dim outputStream As Stream = req.GetRequestStream
outputStream.Write(data, 0, data.Length)
outputStream.Close()
End Sub
Anybody have any ideas how I can get this to work?
Thanks,
Peter
I'm trying to write a ASP.NET application that calls another ASP.NET
application using the HttpWebRequest class.
I need to secure the communicate with Client Certificates. I'm adding a
certificate to the request but get a 403 error when running.
I've read that this was a problem with the ASPNET process not being able to
access the certificate store and that a hot fix is available but it will be
part of the .NET Framework 1.0 service pack
(http://support.microsoft.com/?id=817854). We're running .NET Framework
1.1, presumably it's part of this?
Here's my code, I get a 403 error when it hits the req.GetRequestStream
line:
Private Sub PostData(ByVal req As HttpWebRequest, ByVal data As Byte(),
ByVal CertFileName as string)
Dim x509Cert As X509Certificate =
X509Certificate.CreateFromCertFile(CertFileName)
req.ClientCertificates.Add(x509Cert)
' Open data stream for the request and write data (SEND) and close
stream
Dim outputStream As Stream = req.GetRequestStream
outputStream.Write(data, 0, data.Length)
outputStream.Close()
End Sub
Anybody have any ideas how I can get this to work?
Thanks,
Peter