Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

WCF Web service Security error: "At least one security token in the message could not be validated"

$
0
0

Hello, 

I have this service to wich I,m trying to implement the   docs.oasis-open.org username token security. I modify my service file and now when I call it from a client it display the following error:

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:FailedAuthentication

At least one security token in the message could not be validated.

I suppose this error is because I do not have any logic to manage the token. Is there any example that explain how I can manage the token that is send to the service valide it and confirm it as good so then the service execute.

This is my service config:

<services>

      <service name = "WcfService1.Service1">

        <endpoint address="" binding="customBinding"

         bindingConfiguration="customBindingOasis" contract="WcfService1.IService1">

          <headers>

            <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

              <wsse:UsernameToken>

                <wsse:Username>USERNAME</wsse:Username>

                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>

              </wsse:UsernameToken>

            </wsse:Security>

          </headers>

       </endpoint>

      </service>

    </services>

    <bindings>

      <customBinding>

        <binding name ="customBindingOasis">

          <security authenticationMode="UserNameOverTransport" includeTimestamp="false"

              messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">

            <secureConversationBootstrap />

          </security>

          <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"

            messageVersion="Soap12" writeEncoding="utf-8">

            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

              maxBytesPerRead="4096" maxNameTableCharCount="16384" />

          </textMessageEncoding>

          <httpsTransport manualAddressing="false" maxBufferPoolSize="524288"

            maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"

            bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

            keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"

            realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"

            useDefaultWebProxy="true" requireClientCertificate="false" />

        </binding>

      </customBinding>

  </bindings>

    <protocolMapping>

      <remove scheme ="https"/>

      <add binding="customBinding" scheme ="https"/>

    </protocolMapping>


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>