Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
Sending soap request with X509 Certificate that uses sha256 signing algorithm

I'm trying to make a soap service.

To send request I need to use X509 Certificate. I used X509Certificate2 class for that purpose.

The problem is that its keys are System.Security.Cryptography.RSACryptoServiceProvider class that accepts only "http://www.w3.org/2000/09/xmldsig#rsa-sha1" signature algorithm. In our case sha256 signature algorithm is needed.

Have you got any idea how can I deal with that?

Code looks like this:

        SoapService.GetOrderStatusRequest request = new SoapService.GetOrderStatusRequest()
        {
            orderId = Int32.Parse(txtID.Text),
            requestHeader = new SoapService.RequestHeader() 
            { 
                 institutionId = 123, 
                 requestId = "aeacbff8-ba6d-4a01-8e76-0b4384c24721", 
                 system = "Test" 
            }
        };
        var cert = new X509Certificate2(AppDomain.CurrentDomain.BaseDirectory + "//cert.p12", "Passs123");

        client.ChannelFactory.Credentials.ClientCertificate.Certificate = cert;
        client.ClientCredentials.ClientCertificate.Certificate = cert;

        SoapService.GetOrderStatusResponse response = client.getOrderStatus(request);
        txtResult.Text = response.order.name;

Edit1. I found out this is not problem with X509Certificate2 configuration, but with binding configuration... with message security to be exac.

Unfortunately I still have some errors :/

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!