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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:45:16+00:00 2026-05-22T14:45:16+00:00

I have a test WCF 4 service running on an Windows 2008 / IIS

  • 0

I have a test WCF 4 service running on an Windows 2008 / IIS 7.5 in a domain.

I am using Windows authentication on the binding.

When I access this service from a .net windows client :

var b = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
EndpointAddress a = new EndpointAddress("http://server/TestService.svc");
TestServiceClient tsc = new TestServiceClient(b, a);                                  

It works if I use:

 tsc.ChannelFactory.Credentials.Windows.ClientCredential = new NetworkCredential("bob.jones", "password", "DOMAIN");

It fails if I use:

tsc.ChannelFactory.Credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;

When it fails I see a 401 in Fiddler :
“401 – Unauthorized: Access is denied due to invalid credentials.”

Whe it succeeds I see the same 401 but then a 200 and I can see a kerboros ticket in the request and response.

Here is my service config:

<system.serviceModel>

<bindings>
  <basicHttpBinding>
    <binding>
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Windows" proxyCredentialType="Windows"/>
      </security>
    </binding>
  </basicHttpBinding>
</bindings>

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

  • 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-22T14:45:17+00:00Added an answer on May 22, 2026 at 2:45 pm

    Seeing that no one else seems interested, I guess I’ll have to answer this myself.

    There were many little parts to the problem, but I’ll just give an overview of what I found :

    1. I had to use the provider “Negotiate:Kerberos” and not “Negotiate”.

    2. I had to configure the server principle name (spn) for the domain account I was using for the application pool :

      setspn -A HTTP/ServerName:port Domain\UserName

      setspn -A HTTP/FQDN:port Domain\UserName

    3. Another thing I noticed later on a different service, where the client app didn’t specify the exact BasicHttpSecurityMode.TransportCredentialOnly and ClientCredentialType = HttpClientCredentialType.Windows, was that different client machines required “Negotiate” and others required “Negotiate:Kerberos”. I haven’t figured out if I can control that yet.

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

Sidebar

Related Questions

I have WCF service running from within a Windows Service. This is working fine
I have a successfully running WCF service that I can call using javascript. However
I have local IIS server, local SQL server and WCF test service with 3
I was running my first Visual Studio 2008 Unit Test with a WCF Service
I have a Windows Service that is self hosting a Wcf service, this Wcf
I have a .NET Windows service which self hosts a WCF service. This WCF
I have one test wcf service with default methods and web config is :
I have a WCF Service that return a json. I want to test it
The problem: I have a WCF service that I'm trying to performance test with
I have a WCF service, a MS SQL database, and the Visual Studio 2008

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.