Click here to Skip to main content
12,752,876 members (37,259 online)
Rate this:
Please Sign up or sign in to vote.
See more: WCF

Sorry, I'm not specialist in Webservices but I'll try to explain my problem as fully as possible.

We have a webservice communicating between a database and an application hosted at the customer site. The webservice get back some data needed for the execution of the application from the customer side.

Unfortunately, we get an error message not at each execution of the application, but only once in a while.

The error message is :

[1] ERROR System.ServiceModel.Security.SecurityNegotiationException [(null)] - System.ServiceModel.Security.SecurityNegotiationException: The token provider cannot get tokens for target  «  ». ---> System.ServiceModel.Security.SecurityNegotiationException: Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint..  ---> System.ServiceModel.FaultException: The request for security token has invalid or malformed elements.

   à System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)

   à System.ServiceModel.Security.IssuanceTokenProviderBase`1.ThrowIfFault(Message message, EndpointAddress target)

   à System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)

   --- Fin de la trace de la pile d'exception interne ---

   à System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)

   à System.ServiceModel.Security.IssuanceTokenProviderBase`1.GetTokenCore(TimeSpan timeout)

   à System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)

   à System.ServiceModel.Security.SecurityProtocol.GetToken(SecurityTokenProvider provider, EndpointAddress target, TimeSpan timeout)

   --- Fin de la trace de la pile d'exception interne ---

The configuration from the webservice side is :

<binding name="wsHttpBindingConfiguration" closeTimeout="10:01:00" openTimeout="10:01:00"
receiveTimeout="10:01:00" sendTimeout="10:01:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
<security mode="Message">
<message clientCredentialType="None" establishSecurityContext="false"/>

The configuration from the client side is :

<binding name="wsHttpBindingConfiguration" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:50:00" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Message">
<message clientCredentialType="None" establishSecurityContext="false"/>

Can you help me with this?

Thanks in advance,

Posted 24-Jan-13 23:32pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Modify your code as follows.

<security mode="Message">
     <message algorithmsuite="TripleDesSha256Rsa15">

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 11 Jan 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100