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

  • Home
  • SEARCH
  • 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 309303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:43:46+00:00 2026-05-12T07:43:46+00:00

I have a WCF Service operation which takes an object as a parameter. This

  • 0

I have a WCF Service operation which takes an object as a parameter. This object has a byte[] property among others. A Client program calls this service operation using a svcutil generated proxy.

when client program populates the object’s bype[] propery with size more than 50Kb it throws following error. (while an image size smaller than 50kb assigned to the byte[], it works).

The error which I am getting is:

System.ServiceModel.ProtocolException was unhandled
Message=”The remote server returned an unexpected response: (400) Bad Request.”

This is my Server side Config:

<system.serviceModel>
<diagnostics>
   <messageLogging logMalformedMessages="false" logMessagesAtServiceLevel="false"
    logMessagesAtTransportLevel="false" />
</diagnostics>
<services>
  <service behaviorConfiguration="ProjectABC.ABCServiceBehavior"
    name="ProjecXAPI.ContentService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="testContentBinding"
         bindingName="testContentBinding" contract="ProjectABC.IABCtService" />
        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="higherMessageSize_MEX"
         contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
    <serviceBehaviors>
        <behavior name="ProjectABC.ABCServiceBehavior">
            <serviceMetadata httpGetEnabled="true"/>
                  <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
            <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
    </serviceBehaviors>
</behaviors>
<bindings>
  <basicHttpBinding>
    <binding name="testContentBinding" messageEncoding="Mtom" transferMode="Buffered">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                    maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="None"></security>
    </binding>
  </basicHttpBinding>
  <mexHttpBinding>
    <binding name="higherMessageSize_MEX"/>
  </mexHttpBinding>
</bindings>
</system.serviceModel>

This is my Client side Config:

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="testContentBinding_IContentService" closeTimeout="01:01:00"
        openTimeout="01:01:00" receiveTimeout="01:10:00" sendTimeout="01:01:00"
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
        messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
          maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </basicHttpBinding>
</bindings>

<client>
  <endpoint address="http://localhost:2361/Content/ContentService.svc"
            binding="basicHttpBinding" bindingConfiguration="testContentBinding_IContentService"
            contract="IContentService" name="testContentBinding_IContentService" />
</client>
</system.serviceModel>
  • 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-05-12T07:43:47+00:00Added an answer on May 12, 2026 at 7:43 am

    Ok, I am answering my own question here –

    Just found out that there is a setting on in server side config “maxReceivedMessageSize”. Once you set this to the max size you want server to accept, you are ready to go.

    Thanks & Regards,
    Ajay

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

Sidebar

Ask A Question

Stats

  • Questions 284k
  • Answers 284k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer See here and here for a pretty thorough technical comparison… May 13, 2026 at 4:36 pm
  • Editorial Team
    Editorial Team added an answer Create two divs inside your main div <div id="main"> <div… May 13, 2026 at 4:36 pm
  • Editorial Team
    Editorial Team added an answer First of all, they're not doing the same thing. Floats… May 13, 2026 at 4:36 pm

Related Questions

I'm building a basic CRUD library, that I anticipate use in both local (add
I created a RESTful service using WCF which calculates some value and then returns
I have a Ajax call using asp.net scriptmanager. Which behind the scene takes the
Haven't seen many Geneva related questions yet, I have posted this question in the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.