Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am receiving an error from my SP 2010 Service Application when I try to execute the code from my proxy.

An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ystem.ServiceModel.FaultException: An error occurred when verifying security for the message.

I have done some searching some say this is an obscure WCF error thrown when the server and client's clocks are off, but I am getting this error when the server and client are running on the same machine. I have no service references to update, so that isn't the issue either.

Can anyone help me out here?

Here is the code in my proxy where the error gets thrown:

    public string ConvertToTLForm(string inputDocument, string tipAndLeadLibrary, string siteCollectionURL)
    {

        // execute the call against the service app
        ExecuteOnChannel("ConvertToTLForm",
            delegate(ITipAndLeadAPIContract channel)
            {
                channel.ConvertToTLForm(inputDocument, tipAndLeadLibrary, siteCollectionURL);
            });

        return "";
    }

Here is my web.config file for my service application:

<?xml version="1.0" encoding="utf-8" ?> <configuration>   <system.web>
    <compilation debug="true" defaultLanguage="C#" />   </system.web>   <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="TLAPITypeBehaviors" >
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service name="AF.TipAndLeadAPI.TipAndLeadAPIServiceApplication" behaviorConfiguration="TLAPITypeBehaviors">
        <endpoint binding="customBinding" bindingConfiguration="TLAPIServiceHttpBinding"
                  contract="AF.TipAndLeadAPI.ITipAndLeadAPIContract"
                  address="" />
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
      </service>
    </services>
    <bindings>
      <customBinding>
        <binding name="TLAPIServiceHttpBinding">
          <security authenticationMode="IssuedToken" allowInsecureTransport="true" />
          <binaryMessageEncoding>
            <readerQuotas maxStringContentLength="1048576" maxArrayLength="2097152" />
          </binaryMessageEncoding>
          <httpTransport maxReceivedMessageSize="2162688" authenticationScheme="Anonymous" useDefaultWebProxy="false" />
        </binding>
      </customBinding>
    </bindings>   </system.serviceModel>   <system.webServer>
    <security>
      <authentication>
        <anonymousAuthentication enabled="true" />
        <windowsAuthentication enabled="false" />
      </authentication>
    </security>   </system.webServer> </configuration>
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

It turns out I made a rookie mistake. My client.congfig file in my Hive 14/WebClients folder had a different authenticationMode then my web.config file in my Hive 14/WebServices folder. Once I changed them both to "IssueTokenOverTransport" this issue was resolved. Hope it helps!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.