S
Sunil
Hello Gurus,
Trying to consume a webservice through aspx page over SSL with Client
Certificate and getting below error.
System.Net.WebException: The request failed with HTTP status 403: Access
Forbidden. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
Am able to consume the same webservice using console application. Am I doing
something wrong.
Here is the sample code which is working fine using console application
---------------------------------
Dim ws As New ws.getData()
Dim nFormat As Integer = 0
ws.Url = "https://securesite/webservice.asmx"
Dim cert As X509Certificate =
X509Certificate.CreateFromCertFile("c:\sendCert.cer")
ws.ClientCertificates.Add(cert)
ws.GetNumber("string", nFormat)
Trying to consume a webservice through aspx page over SSL with Client
Certificate and getting below error.
System.Net.WebException: The request failed with HTTP status 403: Access
Forbidden. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
Am able to consume the same webservice using console application. Am I doing
something wrong.
Here is the sample code which is working fine using console application
---------------------------------
Dim ws As New ws.getData()
Dim nFormat As Integer = 0
ws.Url = "https://securesite/webservice.asmx"
Dim cert As X509Certificate =
X509Certificate.CreateFromCertFile("c:\sendCert.cer")
ws.ClientCertificates.Add(cert)
ws.GetNumber("string", nFormat)