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

The Archive Base Latest Questions

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

I was running my first Visual Studio 2008 Unit Test with a WCF Service

  • 0

I was running my first Visual Studio 2008 Unit Test with a WCF Service and I received the following error:

Test method UnitTest.ServiceUnitTest.TestMyService threw exception: System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme ‘Anonymous’. The authentication header received from the server was ‘Negotiate,NTLM’. —> System.Net.WebException: The remote server returned an error: (401) Unauthorized..

I am also getting the following failed audit in the security log:

Logon Failure: Reason: The user has not been granted the requested logon type at this machine
User Name: (Internet Guest Account)
Domain:
Logon Type: 3
Logon Process: IIS
Authentication Package:
MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Workstation Name:

I am hosting the WCF service in IIS 6.0 on a Windows XP SP3 machine. I have both the ‘Anonymous Access’ and ‘Integrated Windows authentication’ checked for the WCF service virtual directory.

Here is my config file for the service:

<system.serviceModel>     <services>         <bindings>             <basicHttpBinding>                 <binding name='MyBinding'>                <security mode='None' />            </binding>             </basicHttpBinding>             <customBinding>                 <binding name='MyBinding'>                <transactionFlow />                     <textMessageEncoding />                     <httpsTransport authenticationScheme='Ntlm'/>                 </binding>             </customBinding>             <wsHttpBinding>                 <binding name='MyBinding'>                    <security mode='None' />                </binding>             </wsHttpBinding>         </bindings>         <service              behaviorConfiguration='Service1Behavior'             name='Service1'         >             <endpoint                  address=''                  binding='wsHttpBinding'                 bindingConfiguration='MyBinding'                 contract='IService1'             >                 <identity>                     <dns value='localhost' />                    </identity>             </endpoint>         </service>     </services>     <behaviors>         <serviceBehaviors>             <behavior name='Service1Behavior'>                 <serviceMetadata httpGetEnabled='true' />                    <serviceDebug includeExceptionDetailInFaults='false' />                </behavior>         </serviceBehaviors>     </behaviors> </system.serviceModel> 
  • 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. 2026-05-10T19:55:27+00:00Added an answer on May 10, 2026 at 7:55 pm

    I had to change the following IIS and WCF service configurations to get past the ‘Negotiate,NTLM’ exception.

    IIS Configurations:

    — Unchecked ‘Anonymous Access’ checkbox and check the ‘Integrated Windows authentication’ checkbox in the directory security setting for the WCF Service virtual directory.

    WCF Services:

    — implemented basicHttpBinding and configured the basicSettingBinding security setting to ‘TransportCredentialsOnly’ mode and TransportClientCredentialType to ‘Windows’

    Here is my updated wcf service configuration:

    <system.serviceModel>     <bindings>         <basicHttpBinding>             <binding name='windowsBasicHttpBinding'>                 <security mode='TransportCredentialOnly'>                     <transport clientCredentialType='Windows' />                 </security>             </binding>        </basicHttpBinding>     </bindings>     <services>         <service           behaviorConfiguration='CityOfMesa.ApprovalRouting.WCFService.RoutingServiceBehavior'            name='CityOfMesa.ApprovalRouting.WCFService.RoutingService'         >             <endpoint                  binding='basicHttpBinding' bindingConfiguration='windowsBasicHttpBinding'                 name='basicEndPoint'                     contract='CityOfMesa.ApprovalRouting.WCFService.IRoutingService'              />         </service>     </services>     <behaviors>         <serviceBehaviors>             <behavior                  name='CityOfMesa.ApprovalRouting.WCFService.RoutingServiceBehavior'             >                 <serviceMetadata httpGetEnabled='true' />                 <serviceDebug includeExceptionDetailInFaults='true' />            </behavior>         </serviceBehaviors>     </behaviors> </system.serviceModel> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im running a web application in visual studio 2008... while running, my first web
I'm running Visual Studio 2008 Professional, but I can't seem to open a project
We have been getting a range on infuriating error dialogs using Visual Studio 2008
I want to try PartCover for code coverage. I'm running Visual Studio 2008 Professional
I am running Visual Studio 2008 with SP1. When I debug an application, it
I am running a Qt C++ Project in Visual Studio 2008 and I got
First of all, before I begin, I am using VC++ 2008 professional, running an
We start use C# build-in unit test functionality. I have VisualStudio 2008 created unit
I just got Visual Studio 2010 installed and running on my development machine (alongside
Using Visual Studio 2008 and Boost Libraries 1.46.1 I want to compile and link

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.