2013-08-26 23 views
5

Mam usługę wcf, która będzie działać tylko po wdrożeniu jej na serwerze i skonfigurowaniu za pomocą IIS. tam komunikat o błędzie uzyskać podczas uruchamiania go przez IIS Express:Nie można uruchomić usługi WCF na komputerze lokalnym

The authentication schemes configured on the host ('Ntlm, Anonymous') do not allow those configured on the binding 'BasicHttpBinding' ('Negotiate'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly. Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement.

moich usług web.config binging wygląda następująco:

<services> 
     <service name="LMS.Services.Services.AppService" behaviorConfiguration="LargeDataRequestBehavior"> 
     <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttp_LargeDataRequestBinding" contract="LMS.Services.Services.AppService" /> 
     <endpoint address="mex" binding="basicHttpBinding" bindingConfiguration="basicHttp_LargeDataRequestBinding" contract="IMetadataExchange" /> 
     </service> </services> 

i moi wiążące wygląda następująco:

<bindings> 
     <basicHttpBinding> 
     <binding name="basicHttp_LargeDataRequestBinding" receiveTimeout="01:00:00" sendTimeout="01:00:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text"> 
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />   
      <security mode="TransportCredentialOnly"> 
      <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" >    
      </transport> 
      <message clientCredentialType="UserName" algorithmSuite="Default" /> 
      </security> 
     </binding> 
     <basicHttpBinding> 
    </bindings> 

Każda pomoc będzie bardzo ceniona.

Odpowiedz

7

Spróbuj zmienić tę część. Problem polega na tym, że wyliczenie dla systemu Windows typu danych uwierzytelnia się na protokół o nazwie Negocjuj. IIS informuje, że funkcja Negotiate nie została włączona w Twojej witrynie, dozwolone są tylko podstawowe (brak zabezpieczeń) i Ntlm (inna forma zabezpieczeń systemu Windows).

<bindings> 
    <basicHttpBinding> 
    <binding>  
     <security > 
     <transport clientCredentialType="Ntlm" >    
     </transport> 
     </security> 
    </binding> 
    </basicHttpBinding> 
</bindings> 

WTF polega na tym, że istnieje niedopasowanie między "Negocjuj" i "Windows".

+0

Że uczynił to działać, ale spowodowało kolejną emisję na powołanie boczna usługa proxy dla pakietu silverlight. Otrzymuję teraz ten błąd: Nie można przetworzyć komunikatu z Action 'urn: AppService/GetTemplatesByCategory' w odbiorniku, z powodu niezgodności ContractFilter w EndpointDispatcher. Może to być spowodowane niedopasowaniem umowy (niedopasowane działania między nadawcą a odbiorcą) lub niedopasowaniem powiązania/bezpieczeństwa między nadawcą a odbiorcą. Sprawdź, czy nadawca i odbiorca mają tę samą umowę i to samo wiązanie (z wymaganiami bezpieczeństwa, np. Wiadomość, Transport, Brak – greektreat

+0

nie musicie omijać mojego ostatniego komentarza, zmieniłem adres URL usługi u mojego klienta przez pomyłkę! – greektreat

+0

Cześć Aron. "/" w zamykającym tagu basicHttpBinding, a literówka powoduje, że XML jest nieważny, więc nie pozwolę sobie na edycję pojedynczego znaku lub sam go naprawię –

1

Aktualizacja IIS Authentication ustawienia jak poniżej ustalonych w moim przypadku:

  • Anonymous Authentication: Disabled
  • Windows Authentication: Enabled
Powiązane problemy