Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3596018
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:55:44+00:00 2026-05-18T19:55:44+00:00

I have a self-hosted WCF REST service based on the WebHttpBinding. One of the

  • 0

I have a self-hosted WCF REST service based on the WebHttpBinding. One of the methods on the service looks something like this:

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "myMethod")]
    Stream MyMethod(Stream contents);

I wrote a simple test program that creates a HttpWebRequest to try and POST data to this method. This works fine in the following scenarios:

  1. Service is not using any security.
  2. Service is using transport security without client certificate.
  3. Service is using transport security with client certificate and I POST 0 bytes.

If I try to use transport security with a client certificate a POST more than 0 bytes, the service returns HTTP 403 (forbidden), and it never hits any of my code.

This is driving me nuts.

Any ideas?

UPDATE

After enabling tracing for http.sys, I observed the following message in the trace:

Attempt by server application to receive client certificate failed with status: 0xC0000225.

Does anyone know what this means? I’m certain that I’m sending the client certificate and certain that it’s trusted by the host machine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T19:55:45+00:00Added an answer on May 18, 2026 at 7:55 pm

    After long and painful searching, I finally discovered that the problem was a corrupt client certificate. Although there were no outward indications, the private key for this certificate was not saved on the local machine. We generated the certificate in code, and then imported it into the current user’s personal store. We did not, however, set the RSACryptoServiceProvider.PersistKeyInCsp property on the object used to generate the private key. As a result, .NET deleted the private key container and the imported certificate ended up referencing a non-existant private key.

    The response to this post goes over the gotchas in importing certificates with .NET in some detail: Inserting certificate with private key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a self-hosted WCF REST service based on the WebHttpBinding. One of the
I have a Self-Hosted (Console App) WCF REST service with the following binding: WebMessageEncodingBindingElement
I have self hosted net tcp WCF service that exposes two methods and the
I have a self hosted TCP based WCF service. I am now building a
I have a self-hosted WCF service and I'm having the following problem: 15 minutes
I have a self-hosted WCF service with the InstanceContextMode set to PerSession. How can
I have a self hosted Net Tcp WCF service and I have the following
I have a self-hosted WCF REST application which is designed to accept and return
I have a self-hosted WCF service that is hosted by a desktop application. I
I have a WCF self-hosted service in a Windows Forms application. I am going

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.