Click here to Skip to main content
15,880,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my code if ----------------
C#
namespace PAS
{
    public class PASMail : IPASMail
    {
        public string DoWork(string masterstring)
        {
            SMS_Email email = new SMS_Email();
            return email.SendEml(masterstring);
        }
    }
}

Config File -----------------------------------

XML
<services>
     <service name="PAS.PasEmailer.PASMail" behaviorConfiguration="mybehaviour">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="PasEmailer.IPASMail"        name="BasicHttpBinding_IPASMail" />
      </service>
</services>

<bindings>
    <basicHttpBinding>
        <binding name="BasicHttpBinding_IService1" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:20:00" maxReceivedMessageSize="56384" maxBufferSize="56384" messageEncoding="Mtom" textEncoding="utf-8" >
          <readerQuotas  maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None" >
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="UserName" algorithmSuite="Default"/>
          </security>
        </binding>
    </basicHttpBinding>
</bindings>
<behaviors>
      <serviceBehaviors>
        <behavior name="mybehaviour">
          <serviceMetadata httpGetEnabled="true"  />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
        <behavior name="">
          <serviceMetadata httpsGetEnabled="true"  />

          <serviceDebug includeExceptionDetailInFaults="false" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

-------------
And i am getting this error

The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.
Posted

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