2013-08-26 20 views
5

Ho un servizio wcf che funzionerà solo dopo averlo distribuito su un server e configurato tramite IIS. c'è un messaggio di errore ottengo quando si esegue attraverso espresso IIS è:Impossibile eseguire il servizio WCF su computer locale

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.

mio servizi web.config abbuffate si presenta così:

<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> 

e il mio aspetto di legame come questo:

<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> 

Qualsiasi aiuto sarebbe molto apprezzato.

risposta

7

Provare a modificare questa parte. Il problema è che l'enumerazione per tipo di credenziali Windows si associa a un protocollo chiamato negoziazione. IIS ti informa che Negotiate non è stato abilitato sul tuo sito Web, solo Basic (nessuna sicurezza) e Ntlm (un'altra forma di Windows Security) è consentito.

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

Il WTF qui è che c'è una discrepanza tra "Negoziare" e "Windows".

+0

che ha fatto farlo funzionare, ma ha causato un altro problema sul chiamante servizio proxy laterale per un pacchetto Silverlight. Ora sto ricevendo questo errore: il messaggio con l'azione "urn: AppService/GetTemplatesByCategory" non può essere elaborato sul ricevitore, a causa di una mancata corrispondenza di ContractFilter su EndpointDispatcher. Ciò può essere dovuto a una mancata corrispondenza contrattuale (azioni non corrispondenti tra il mittente e il destinatario) o una mancata corrispondenza tra il mittente e il destinatario. Verifica che il mittente e il destinatario abbiano lo stesso contratto e lo stesso legame (inclusi i requisiti di sicurezza, es. Messaggio, Trasporto, Nessuno – greektreat

+0

non riesco a risolvere il mio ultimo commento, ho cambiato l'indirizzo del servizio nel mio cliente per errore! – greektreat

+0

Ciao Aron. '/' nel tag di chiusura BasicHttpBinding. L'errore di battitura fa sì che XML non sia valido, quindi non mi consente di eseguire una modifica di un singolo carattere o semplicemente la correggo io stesso. –

1

Aggiornamento IIS Authentication impostazioni come di seguito fissato nel mio caso:

  • anonimo di autenticazione: Disabled
  • autenticazione di Windows: Enabled
Problemi correlati