несоответствие безопасности с привязкой REST - PullRequest
2 голосов
/ 10 ноября 2011

Я написал какой-то сервис wcf, который должен поддерживать SOAP и REST с использованием IIS. SOAP работает - и с этим нет проблем. Но когда я вызываю REST от проводника, я получаю это сообщение

       <Reason>
             <Text xml:lang="en-US">
                The message with Action '' cannot be processed at the 
                receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may 
                be because of either a contract mismatch (mismatched Actions between sender 
                and receiver) or a binding/security mismatch between the sender and the  
                receiver. Check that sender 
                and receiver have the same contract and the same binding (including security 
                requirements, e.g. 
                Message, Transport, None).
            </Text>
       </Reason>

Соответствующий раздел файла Web.config:

 <service behaviorConfiguration="ServiceBehavior" name="Service.SOAPService">
    <endpoint binding="basicHttpBinding" contract="Contracts.ISOAPService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>

  <service behaviorConfiguration="ServiceBehavior" name="Service.RESTService" >
    <endpoint binding="webHttpBinding" contract="Contracts.IRESTService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>

  .
  .
  .
   <behaviors>
  <serviceBehaviors>
    <behavior name="ServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...