Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8150189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:00:11+00:00 2026-06-06T15:00:11+00:00

I am trying to use third-party web service (php-based) in asp.net c# application, and

  • 0

I am trying to use third-party web service (php-based) in asp.net c# application, and failed with service configuration.Already tried add service/web reference – all the same error :

The content type text/html 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. The first 402 bytes of the response were:
‘<?xml version=”1.0″ encoding=”utf-8″?><soap:Envelope
xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/&#8221;
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221;><soap:Body>;<…

[Response was edited manually to correctly display > < chars, it’s perfectly valid otherwise]

To me it seems like a perfectly valid response, and I tried to look at what fiddler writes in response headers –
Content-Type: text/html, which is probably the source of issue – webservice sents wrong content-type (text/html instead of text/xml) , but how to configure my client to ignore/override received content-type ? Googling gets me nothing so please, if anyone could help – where problem is? Binding\endpoint configuration is a default basicHttpBinding/endpoint which
is generated by VS2010 when using Add Service Reference option, nothing was changed there.
Thanks in advance.

[app.config]

<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup  name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0,      Culture=neutral, PublicKeyToken=b77a5c561934e089">
  <section name="Collection.ServicePlayground.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SmsServiceSoap1" closeTimeout="00:01:00" openTimeout="00:01:00"
    receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
    bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
    useDefaultWebProxy="true">
    <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>
<client>
  <endpoint address="http://ws1.streamsms.ru/SmsService.php" binding="basicHttpBinding"
    bindingConfiguration="SmsServiceSoap1" contract="SmsService.SmsServiceSoap"
    name="SmsServiceSoap2" />
</client>
</system.serviceModel>
<applicationSettings>
<Collection.ServicePlayground.Properties.Settings>
  <setting name="Collection_ServicePlayground_WSStreamProvider_SmsService"   serializeAs="String">
    <value>http://ws1.streamsms.ru/SmsService.php</value>
  </setting>
 </Collection.ServicePlayground.Properties.Settings>
 </applicationSettings>
 </configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:00:12+00:00Added an answer on June 6, 2026 at 3:00 pm

    Perhaps overkill, but you could try with a custom encoder for the binding. Default is text/xml.

    http://msdn.microsoft.com/en-us/library/ms751486.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use WCF to consume a web service provided by a third-party's
I am trying to use a SOAP Web Service provided by a third party.
I am trying to use a third party web service which is exposed through
I am trying to use an X509Certificate within an ASP.NET web service within the
I am trying to use RestSharp to consume a third-party REST web service and
I have a third party .Net web application (Sitecore) which connects to an Oracle
I am trying to use a third party script and extract the logged in
I have a third-party class that I am trying to use in Hadoop, and
I have an ASP.NET c# web application published to a server of ours. It
We are troubleshooting a SQL Server 2005 connection issue on a closed-source third-party ASP.NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.