Ask a Question related to ASP.NET Web Services, Design and Development.
-
charlief1975 #1
Consuming a secure webservice using x509 cert (p12)
This code works in a WinForm app. Can't get it to work in an asp.net app. I
don't have control over the service. Don't know what language it is...just
what it exposes.
I have a class. This class contains all my functions to work with the
service. In the new section for the class I have the following:
Public Sub New()
Dim Store As X509CertificateStore =
X509CertificateStore.LocalMachineStore(X509Certifi cateStore.MyStore)
Dim MatchingCertificates As X509CertificateCollection
Try
If Not Store.OpenRead() Then
Throw New Exception("Unable to open local machine
certificate store")
End If
'try to find our certificate
MatchingCertificates =
Store.FindCertificateBySubjectString("AllInternetN ow 1-allinternetnow")
If (MatchingCertificates.Count = 0) Then
Throw New Exception("Unable to locate certificate in the
local machine store")
End If
Service = New ServiceGatewayService
'* configure the service URL
Service.Url = WEBSERVICE_URL
'* add the certificate for identification
Service.ClientCertificates.Add(MatchingCertificate s(0))
Finally
Store.Dispose()
End Try
End Sub
The new section loads the cert from the maching keystore. Seems to
work...looks like is added to the service object.
Then I call a function with this code:
Dim req As New comsbciotlinequalLineQualRequest
Dim rsp As New comsbciotlinequalLineQualResponse
With req
.clientID = USERNAME
.clientPassword = PASSWORD
.workingTN = phoneNumber
.requestType = "1"
.appVersion = "1"
'.promo = PROMOCODE
End With
rsp = Service.processLineQual(req)
Return rsp
Service.processline never returns anything. I checked with the service
provider and in their log they see a 403 error. I got 403 errors before and
it was a certificate problem on my side. As I said before, it works in a
winform app, so cert is correctly installed.
I have tried impersonation, but open to anything. Any info would be great.
Thanks
charlief1975 Guest
-
Error Consuming Webservice
We are attempting to consume a webservice that passes faxed documents back and forth. When we try to send or retrieve a ducment through the... -
Websevice secured with X509 cert (ssl)
Hi, I try to consume a webservice. In order to see it in IE, I needed to install (provided) X509 certs (I got 2 of them) When I try to open that... -
Webservice, SSL, X509 certificate
Hi, i'm consuming a webservice over SSL (https) and additionally sending a X509 client-certificate. On my Win2000 Prof. workstation i installed... -
Unable to communicate with SSL Web Service using X509 Client Cert
This is one of those cases where it works (calling the Web Service) in a WinForm app but not in ASP.Net. I am attempting to call a PayPal Web... -
Keyset does not exist at Microsoft.Web.Services.Security.X509.X509
I get this error trying to read de sign from a X509 Certficate Token X509SecurityToken.get_SignatureKey(). When I use the C# clases from windows...



Reply With Quote

