WCF Authentifizierung Verbindliche Fehler

Ich habe einen WCF Service, der verbraucht auch eine sharepoint userprofile service.
Ich erhalte diese Fehlermeldung, wenn ich versuche, führen Sie den IIS-Dienst auf.

Den Authentifizierungsschemas auf dem host konfiguriert
('IntegratedWindowsAuthentication') nicht erlauben, diese konfiguriert
die verbindlich "WSHttpBinding' ('Anonym'). Bitte stellen Sie sicher, dass die
SecurityMode festgelegt ist, zu Transport-oder TransportCredentialOnly.
Außerdem kann dies behoben werden, indem die änderung der Authentifizierung
Regelungen für diese Anwendung über die IIS-management-tool, durch
ServiceHost.Die Authentifizierung.AuthenticationSchemes Eigenschaft, in der
Anwendung-Konfigurations-Datei an
element, durch die Aktualisierung der ClientCredentialType-Eigenschaft auf die Bindung,
oder durch anpassen der AuthenticationScheme-Eigenschaft auf den
HttpTransportBindingElement.

Hier ist mein web.config

<bindings>
<basicHttpBinding>

    <binding name="UserProfileServiceSoap" 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="true">
    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
    <security mode="TransportCredentialOnly">
    <transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" />
    <message clientCredentialType="UserName" algorithmSuite="Default" />
    </security>
    </binding>

</basicHttpBinding>
<wsHttpBinding>

    <binding name="HttpBinding1" maxReceivedMessageSize="2147483647" receiveTimeout="10:00:00" openTimeout="10:00:00"
    sendTimeout="10:00:00" closeTimeout="10:00:00" bypassProxyOnLocal="false" transactionFlow="false"
    hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288000" allowCookies="false">
    <security mode="None"/>
    </binding>

    <binding name="WSHttpBinding_MessageSecurity" maxReceivedMessageSize="2147483647" receiveTimeout="10:00:00"
    openTimeout="10:00:00" sendTimeout="10:00:00" closeTimeout="10:00:00" bypassProxyOnLocal="false"
    transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288000" allowCookies="false">
    <security mode="Message">
    <transport clientCredentialType="Windows" proxyCredentialType="None" realm="">
    <extendedProtectionPolicy policyEnforcement="Never"/>
    </transport>
    <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true"/>
    </security>
    </binding>

</wsHttpBinding>
</bindings>

services>
<service name="UserProfileWcf.UserProfileService" behaviorConfiguration="UserProfileWcf.UserProfileServiceBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="HttpBinding1" contract="UserProfileWcf.ServiceContract.IUserProfileService" name="UserProfileServiceEndpoint">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="UserProfileWcf.UserProfileServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="65536000"/>
<serviceThrottling maxConcurrentSessions="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
        <client>
            <endpoint address="http://xyz/_vti_bin/userprofileservice.asmx"
                    binding="basicHttpBinding" bindingConfiguration="UserProfileServiceSoap"
                    contract="SharePointUserProfileService.UserProfileServiceSoap"
                    name="UserProfileServiceSoap" />
        </client>

Derselben Konfiguration funktioniert auf meinem lokalen Rechner. Wo sind meine Bindungen schief gehen kann ?

  • Ich denke, die Konfiguration, die Sie verwendet haben, zu definieren, eine für die end-Punkte mit wsHttpBinding ist HttpBinding1 die Sicherheit hat mode auf none gesetzt. Es scheint, wenn Sie gewirkt haben, den Dienst in IIS (also IIS fungiert als service-host-Rechner), müssen Sie die Windows-Authentifizierung verwendet. Versuchen Sie, setzen Sie security mode auf Transport für HttpBinding1 oder vielleicht versuchen, ändern Sie die IIS-Authentifizierung auf anonym, um zu sehen, ob es funktioniert.
  • Wenn Sie sagen, gleiche Konfiguration funktioniert auf Ihrem Rechner, meinst du die Entwicklungsumgebung?
  • Oh Mann, der arbeitete (Anonymes). :\ Ich bin erstaunt. Wie ich wurde, fehlt eine solche kleine, aber wichtige Sache. Dank Vibhu, bitte posten Sie Ihre Antwort getrennt, so konnte ich markieren Sie es als Antwort
InformationsquelleAutor Nanu | 2013-07-11
Schreibe einen Kommentar