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 8265361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:46:22+00:00 2026-06-08T04:46:22+00:00

I have a WCF service which is being used as a wrapper on a

  • 0

I have a WCF service which is being used as a wrapper on a third party asmx service we are integrating with. The service it is communicating with was added using the Add Service reference dialog in visual studio. The code in the WCF service works when executed in unit tests, and also works when debugging the Host application.

When debugging the host runs in the ASP.NET Development Server and it works without errors. When I deploy the application to the local IIS instance (same as development machine, IIS 5.1) the service will start and run, but it throws this error when connecting ot the third party asmx endpoint:

System.ServiceModel.Security.SecurityNegotiationException: 
Could not establish trust relationship for the SSL/TLS secure channel with
authority 'xxxxx.thirdparty.com'. ---> System.Net.WebException: The underlying
connection was closed: Could not establish trust relationship for the SSL/TLS
secure channel. ---> System.Security.Authentication.AuthenticationException: 
The remote certificate is invalid according to the validation procedure.

These are settings in the config file for the service endpoint:

<basicHttpBinding>
  <binding name="ServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
    useDefaultWebProxy="false" proxyAddress="http://[internalWebProxyHere]">
    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
    <security mode="Transport">
      <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
      <message clientCredentialType="UserName" algorithmSuite="Default"/>
    </security>
  </binding>
</basicHttpBinding>

The service works in visual studio, but not after deploying to IIS. What can I do to debug AuthenticationExceptions?

Edit: the client endpoint looks like this:

<endpoint address="https://'xxxxx.thirdparty.com/thirdpartyendpoint.asmx" 
    binding="basicHttpBinding" bindingConfiguration="ServiceSoap" 
    contract="eContracting.ServiceSoap" name="ServiceSoap"
    behaviorConfiguration="Behavior"/>

And I tried to add an endpoint behavior to disable the certificate validation but this did not help:

<behavior name="Behavior">
  <clientCredentials>
    <serviceCertificate>
      <authentication certificateValidationMode="None"/>
     </serviceCertificate>
    </clientCredentials>
</behavior>

If it also helps the third party certificate was issued by Rapid SSL CA, the certificate is valid. Looking in my local certificate store this certificate is in the “Intermediate Certification Authorities” tab, but not in “Trusted Root Certification Authorities” or in “Trusted Publishers”.

Edit: The issue was resolved by adding the cert to the “Trusted Root Certification Authorities”, though there was a catch.

  1. Importing certificates from ControlPanel -> InternetProperties -> Content -> Certificates. If you install this way it says it’s successful but it does not show up in winhttpcertcfg.
  2. Importing certificates by doing start -> run -> type ‘certmgr.msc’ and installing through here. It will say imported successfully but certs are not available to winhttpcertcfg.
  3. Importing certificates by start -> run -> MMC and using the certificates snapin does work. Click here to view instructions for Windows XP.

Specifically this is what worked:

  1. Start -> Run -> MMC
  2. File -> Add/Remove Snap-in
  3. Click Add…
  4. Select Certificates and click Add
  5. Select Computer Account an click Next
  6. Select Local computer and click Finish
  7. Click Close
  8. Import certificate from console root to these locations:

    • Trusted Root Certification Authorities
    • Intermediate Certification Authorities
    • Third-Party Root Certification Authorities
  • 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-06-08T04:46:24+00:00Added an answer on June 8, 2026 at 4:46 am

    Try enabling tracing in the service web.config. By setting the switchValue to Verbose you might be able to find out a more detailed error. Maybe there is something wrong with the certificate.

    Configure and Enable Tracing

    You could also try setting the service certificate validation mode to none.

    X509ServiceCertificateAuthentication.CertificateValidationMode Property

    Another option is to import the Rapid SSL CA to your Trusted Root Certification Authorities on your local machine. I suspect cassini isn’t validating or is ignoring certificates.

    Another possible issue to look at, the account IIS is running under for your service may not have permissions to read from the certificate store.

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

Sidebar

Related Questions

We have a hybrid WCF and ASMX web service currently being used on a
We have a WCF service developed in C# which is being used by several
I have a WCF service which performs CRUD operation on my data model: Add,
I have a WCF service which references a 3rd party DLL. That DLL looks
I have a WCF service that is being used to generate an XML file
I have a WCF service and I am creating the client using the Add
I have a WCF service which is being hosted in IIS. I have a
I have an IIS 7 hosted WCF service that is mainly being used to
I have a WCF service which accepts a string as a paramter for one
I have a WCF service which works on my dev machine running IIS 7,

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.