none
Client connecting to WCF Service - Can't Connect RRS feed

  • Question

  • I have a simple client that is trying to connect to a WCF server. On the same machine developing the client connects to the service when I am debugging and running locally. As soon as I try to connect a client via another machine (client not running on the same machine as the service) I get the following error. Any help would be apprecaited
            

    Unhandled Exception: System.ServiceModel.Security.SecurityNegotiationException:
    SOAP security negotiation with 'http://192.168.1.241:19919/' for target 'http://
    192.168.1.241:19919/' failed. See inner exception for more details. ---> System.
    ComponentModel.Win32Exception: The message or signature supplied for verificatio
    n has been altered
       at System.ServiceModel.Security.WindowsSspiNegotiation.Decrypt(Byte[] encrypt
    edContent)
       at System.ServiceModel.Security.WSSecurityJan2004.WrappedKeyTokenEntry.Create
    WrappedKeyToken(String id, String encryptionMethod, String carriedKeyName, Secur
    ityKeyIdentifier unwrappingTokenIdentifier, Byte[] wrappedKey, SecurityTokenReso
    lver tokenResolver)
       at System.ServiceModel.Security.WSSecurityJan2004.WrappedKeyTokenEntry.ReadTo
    kenCore(XmlDictionaryReader reader, SecurityTokenResolver tokenResolver)
       at System.ServiceModel.Security.WSSecurityTokenSerializer.ReadTokenCore(XmlRe
    ader reader, SecurityTokenResolver tokenResolver)
       at System.IdentityModel.Selectors.SecurityTokenSerializer.ReadToken(XmlReader
     reader, SecurityTokenResolver tokenResolver)
       at System.ServiceModel.Security.WSTrust.Driver.GetIssuedToken(RequestSecurity
    TokenResponse rstr, SecurityTokenResolver resolver, IList`1 allowedAuthenticator
    s, SecurityKeyEntropyMode keyEntropyMode, Byte[] requestorEntropy, String expect
    edTokenType, ReadOnlyCollection`1 authorizationPolicies, Int32 defaultKeySize, B
    oolean isBearerKeyType)
       at System.ServiceModel.Security.RequestSecurityTokenResponse.GetIssuedToken(S
    ecurityTokenResolver resolver, IList`1 allowedAuthenticators, SecurityKeyEntropy
    Mode keyEntropyMode, Byte[] requestorEntropy, String expectedTokenType, ReadOnly
    Collection`1 authorizationPolicies, Int32 defaultKeySize, Boolean isBearerKeyTyp
    e)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnNegotiationCom
    plete(SspiNegotiationTokenProviderState sspiState, RequestSecurityTokenResponse
    negotiationRstr, RequestSecurityTokenResponse authenticatorRstr)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingM
    essageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)

       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.GetNextOutgoingMe
    ssage(Message incomingMessage, T negotiationState)
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(Tim
    eSpan timeout)
       --- End of inner exception stack trace ---

    Server stack trace:
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(Tim
    eSpan timeout)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan
    timeout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(Tim
    eSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open
    (TimeSpan timeout)
       at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan tim
    eout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(Tim
    eSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChanne
    l`1.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperat
    ion(SecuritySessionOperation operation, EndpointAddress target, Uri via, Securit
    yToken currentToken, TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetToken
    Core(TimeSpan timeout)
       at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan tim
    eout)
       at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecurit
    ySessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceMod
    el.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeo
    ut)
       at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeS
    pan timeout, CallOnceManager cascade)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
    eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
    eout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
    Message methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
    Msg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
    ta, Int32 type)
       at TrafficWCF.ITraffic.WSLogin(String MachineMane)
       at ConsoleApplication1.Program.Main(String[] args) in C:\Documents and Settin
    gs\mbrown\My Documents\Visual Studio 2010\Projects\TrafficWCF\ConsoleApplication
    1\Program.cs:line 39



    • Edited by brown71576 Wednesday, November 11, 2015 7:05 PM
    Wednesday, November 11, 2015 3:29 PM

Answers

  • Hi brown71576,

    According to this case, you said you have switched it to the basicHttpBinding, so did

    the basicHttpBinding works?

    As far as I know, when we call the remote service with wsHttpBinding, we need to set

    the security mode as none. Because the wsHttpBinding’s security mode is windows

    authentication.

    Best Regards,

    Grady

    Thursday, November 12, 2015 2:46 AM
    Moderator

All replies

  • As soon as I try to connect a client via another machine (client not running on the same machine as the service) I get the following error. Any help would be apprecaited

    Possible firewall blocking ports.....

    See inner exception for more details.

    Did you look at it is it there?

    Wednesday, November 11, 2015 5:25 PM
  • As soon as I try to connect a client via another machine (client not running on the same machine as the service) I get the following error. Any help would be apprecaited

    Possible firewall blocking ports.....

    See inner exception for more details.

    Did you look at it is it there?

    No firewall and the inner exception is included in my original post.

    Wednesday, November 11, 2015 6:01 PM
  • I believe it has to do with WSBinding and me not passing credentials. I have switched it to basicHttpBinding instead

    Wednesday, November 11, 2015 7:05 PM
  • Hi brown71576,

    According to this case, you said you have switched it to the basicHttpBinding, so did

    the basicHttpBinding works?

    As far as I know, when we call the remote service with wsHttpBinding, we need to set

    the security mode as none. Because the wsHttpBinding’s security mode is windows

    authentication.

    Best Regards,

    Grady

    Thursday, November 12, 2015 2:46 AM
    Moderator