Invoking Java web service from C# client using JKS and/or PFX certificates

I basically need to secure my requests towards this service.

I've been provided a JAR test client and two files, trust.jks and Client.pfx, but I have no clue how to use them: I understand X509Certificate2 class is involved in some way.

The command line to execute the test client is the following:

java**************** -jar TestClient.jar https://myServiceurl

It works, so I can both see the service, and the service itself should be properly configured.

My C# client (it's targeting .NET 2.0) uses a normal Web Reference to perform requests:

wsReferenceClient service = new wsReferenceClient();
//certificate code here ?
//maybe service.ClientCertificates.Add(<X509Certificate2 object built somehow>); ?

Server settings should be setup properly.

I fumbled around with the X509Certificate2 methods but I can't come out with something that makes sense, so the answer to the 'what have you tried?' question at the moment is 'I don't really know what to try in the first place'.

Any help would be really appreciated.


Turns out I don't need to do anything with the JKS file.

wsReferenceClient service = new wsReferenceClient();
X509Certificate2 cert = new X509Certificate2();
cert.Import("Client.pfx", "<the password>", DefaultKeySet);

This allows my HTTPS requests to go through successfully.

Need Your Help

PHP display error

php mysql

I've created the following code but for some reason it is echoing Array instead of the result:

Temporary table record limit in Sql server

sql sql-server sql-server-2008 temp-tables

Is there any limits for the record in the temporary table.. I have tried with 1.3 million records.. may be i have to deal with billions in the future as the application demands.. Is it possible? I...