Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

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.<br />
<br />
   à System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)<br />
<br />
   à System.ServiceModel.Security.IssuanceTokenProviderBase`1.ThrowIfFault(Message message, EndpointAddress target)<br />
<br />
   à System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)<br />
<br />
   --- Fin de la trace de la pile d'exception interne ---<br />
<br />
   à System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)<br />
<br />
   à System.ServiceModel.Security.IssuanceTokenProviderBase`1.GetTokenCore(TimeSpan timeout)<br />
<br />
   à System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)<br />
<br />
   à System.ServiceModel.Security.SecurityProtocol.GetToken(SecurityTokenProvider provider, EndpointAddress target, TimeSpan timeout)<br />
<br />
   --- Fin de la trace de la pile d'exception interne ---


The configuration from the webservice side is :

XML
<bindings>
<wsHttpBinding>
<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"/>
</security>
</binding>
</wsHttpBinding>
</bindings>


The configuration from the client side is :

XML
<wsHttpBinding>
<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"/>
</security>
</binding>
</wsHttpBinding>
</bindings>


Can you help me with this?

Thanks in advance,

Céline
Posted
v2

1 solution

Modify your code as follows.

<security mode="Message">
     <message algorithmsuite="TripleDesSha256Rsa15">
              clientCredentialType="Windows"
              establishSecurityContext="false"
              negotiateServiceCredential="true"/>
</message></security>
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900