We are trying to access a java webservice through HTTPS from remote system in to our .net client system.we are facing an error:
This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server
Interesting thing is it is working in SOAP UI,but only problem with visual studio.Why it is working in soap UI rather not in Visual studio2010
protected void Page_Load(object sender, EventArgs e)
{
try
{
ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(CertificationvAlidatefunction);
mainclass.ClientCredentials.UserName.UserName = "testuser";
mainclass.ClientCredentials.UserName.Password = "test123";
response = mainclass.Testmethod(request);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
private bool CertificationvAlidatefunction(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate,
System.Security.Cryptography.X509Certificates.X509Chain chain, SslPolicyErrors errors)
{
return true;
}