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 8137987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:21:15+00:00 2026-06-06T11:21:15+00:00

I’m testing out faults and exception handling on my service and am seeing odd

  • 0

I’m testing out faults and exception handling on my service and am seeing odd results.

I have one service contract that has two endpoints configured. One is basicHttpBinding and the other is wsHttpBinding. Locally on my machine I have a test app client and server running. I can call both web service bindings successfully and get the exception I’m looking for on both, exactly what I’m looking for. But when I push my code out to the dev server I can only call the wsHttpBinding endpoint successfully. The basic endpoint returns an odd message. The exception is “The remote server returned an error: (500) Internal Server Error.”

and the Exception Message is:

“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 1024 bytes of the response were: insert bunch of nonsense html here”

Is this a configuration error? An IIS error? A firewall issue? I’ve ran WCF logging and also tracing on the server. My code is being hit just fine and it’s throwing a fault exception fine. The Message Header is empty on the basicHttpBinding but I’m not sure if that’s a problem. I’ve checked the IIS logs as well. It shows the 500 errors but that’s all. Is there anything else I should check?

My endpoints:

<endpoint 
 address="" 
 binding="wsHttpBinding" 
 bindingConfiguration="WSHttpBinding_IEOIEligible_NONSSL"
 name="IEOIEligible_Svc_endpoint_NONSSL" 
 contract="Engine.IEOIEligible">
</endpoint>

<endpoint 
address="mex" 
binding="mexHttpBinding" 
name="Mex_Svc_endpoint"
contract="IMetadataExchange" />

<endpoint 
    address="/basic" 
    binding="basicHttpBinding" 
    bindingConfiguration="BasicHttpBinding_IEOIEligible"
    name="basicEOIEndpoint" 
    contract="Engine.IEOIEligible" />

[Edit]

Binding configuration:

basicHttpBinding

<binding name="BasicHttpBinding_IEOIEligible" closeTimeout="00:01:00"
      openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
      allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
      maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
      messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed"
      useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="Certificate" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="Certificate" algorithmSuite="Default" />
      </security>
    </binding>

wsHttpBinding

<binding name="WSHttpBinding_IEOIEligible_NONSSL" closeTimeout="00:10:00"
      openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
                maxBufferPoolSize="524288" maxReceivedMessageSize="524288" messageEncoding="Text"
      textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="32" maxStringContentLength="819200" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
        enabled="false" />
    </binding>

From the WCF trace file:

The successful call (wsHttp):

<ExtendedData     xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/MessageTraceRecord">
 <MessageProperties>
  <Encoder>application/soap+xml; charset=utf-8</Encoder>
  <AllowOutputBatching>False</AllowOutputBatching>
 </MessageProperties>
 <MessageHeaders>
  <Action d4p1:mustUnderstand="1" xmlns:d4p1="http://www.w3.org/2003/05/soap-envelope" xmlns="http://www.w3.org/2005/08/addressing">http://tempuri.org/IEOIEligible/VerifyEOIRequiredEOIEligibilityFaultFault</Action>
 <RelatesTo xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:5863c107-b721-4b4c-88b8-0d03c22175d1</RelatesTo>
 <ActivityId CorrelationId="a498440c-2e5a-4298-9bc5-ade08d51933c" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">00000000-0000-0000-0000-000000000000</ActivityId>
 </MessageHeaders>
</ExtendedData>

the server 500 (basicHttp)

<ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/MessageTraceRecord">
 <MessageProperties>
  <Encoder>text/xml; charset=utf-8</Encoder>
  <AllowOutputBatching>False</AllowOutputBatching>
 </MessageProperties>
 <MessageHeaders></MessageHeaders>
</ExtendedData>

[Edit]

I am able to get a response from the service using the basicHttpBinding via the Microsoft WCF Test Client but that’s only when I don’t throw a FaultException on the server, meaning the service returned down the happy path. This part I’m not concerned with, thankfully.

I’m unit testing client exception handling and the server is returning a 500 on the basic but not the wsHttpBinding. The wsHttpBinding is returning the proper SOAP fault embedded within the soap body but the basic isn’t. The Soap fault is returned with basicHttpBinding when ran locally just not from a true server.

  • 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-06T11:21:16+00:00Added an answer on June 6, 2026 at 11:21 am

    I figured out the problem to my question. It was a simple config change (that took hours to find). In my binding I changed

    transferMode="Streamed"
    

    to

    transferMode="Buffered"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has

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.