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

  • SEARCH
  • Home
  • 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 851353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:25:01+00:00 2026-05-15T07:25:01+00:00

I am trying to configure a WCF server\client to work with SSL I get

  • 0

I am trying to configure a WCF server\client to work with SSL

I get the following exception:

The HTTP request was forbidden with client authentication scheme
‘Anonymous’

I have a self hosted WCF server.
I have run hhtpcfg
both my client and server certificates are stored under Personal and Trusted People on the Local Machine

Here is the server code:

binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
binding.Security.Mode = WebHttpSecurityMode.Transport;
_host.Credentials.ClientCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.PeerOrChainTrust;
_host.Credentials.ClientCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
_host.Credentials.ClientCertificate.Authentication.TrustedStoreLocation = StoreLocation.LocalMachine;
_host.Credentials.ServiceCertificate.SetCertificate("cn=ServerSide", StoreLocation.LocalMachine, StoreName.My);

Client Code:

binding.Security.Mode = WebHttpSecurityMode.Transport;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; 
WebChannelFactory<ITestClientForServer> cf =
                new WebChannelFactory<ITestClientForServer>(binding, url2Bind);
cf.Credentials.ClientCertificate.SetCertificate("cn=ClientSide", StoreLocation.LocalMachine, StoreName.My);
            ServicePointManager.ServerCertificateValidationCallback
                   += RemoteCertificateValidate;

Looking at web_tracelog.svclog and trace.log
reveals that the server cannot autheticate the client certificate
My certificate are not signed by an Authorized CA
but this is why I added them to the Trusted People….

What Am I missing?
What am I missing?

  • 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-15T07:25:02+00:00Added an answer on May 15, 2026 at 7:25 am

    The trick was to make the Client Certificate valid,

    To do that you have two option:

    1) make it self signed and then put it under the “Trusted Root Certification Authority”.

    Obviously in production you would like your client certificate to be signed by a trusted CA and not self signed.
    see http://msdn.microsoft.com/en-us/library/ms733813.aspx

    2) Sign your client certificate by another certificate you created (let’s call it MyCA) and put MyCA in the “Trusted Root Certification Authority” and have the client certificate in the “Trusted People”. This way your development environment is even more close to the deployment.

    How to create and sign the certificates:
    Look under http://msdn.microsoft.com/en-us/library/bfsktky3.aspx

    Here is the series of commands I used:

    1)makecert -r -pe -ss My -sr LocalMachine -a sha1 -sky exchange -n cn=MyCA -sv “MyCAPrivate.pvk”

    2) makecert -pe -ss My -sr LocalMachine -a sha1 -sky exchange -n cn=SignedClientCertificate -iv “MyCAPrivate.pvk” -ic “MyCAPublic.cer”

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

Sidebar

Related Questions

I'm trying to configure some WCF stuff. Currently, I have a server which allows
im trying to implement simple secured client server communiction using WCF. when im launching
I'm trying to configure a dedicated server that runs ASP.NET to send mail through
I'm trying to configure Windows Powershell to work with Visual Studio. Nothing fancy, just
I am trying to configure the website SSL port with the certificate for a
I'm trying to get my head around the addressing of WCF services. We have
I'm trying to connect to a WCF service with an in-code configured client. The
In our WCF application I am trying to configure reliable sessions. Service: <wsHttpBinding> <binding
I'm trying to create a WCF client to send XML messages to a CGI
I am trying to debug a WCF service. This client has been able to

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.