je courais mon premier Visual Studio 2008 Test Unit avec un service WCF et j'ai reçu l'erreur suivante:WCF Erreur de sécurité avec VS 2008 Test Unit
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..
Je reçois également les éléments suivants audit a échoué dans la sécurité 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:
J'héberge le service WCF dans IIS 6.0 sur un ordinateur Windows XP SP3. J'ai à la fois les "Anonymous Access" et "Authentification Windows intégrée" vérifiés pour le répertoire virtuel du service WCF.
Voici mon fichier de configuration pour le 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>
@alhambraeidos - Je ne suis pas sûr de ce que vous essayez de demander à propos du 'RoutingServiceBehavior' –