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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:32:22+00:00 2026-05-25T11:32:22+00:00

I realize this question has been asked dozens of times https://stackoverflow.com/search?q=maxStringContentLength However, I still

  • 0

I realize this question has been asked “dozens of times”

https://stackoverflow.com/search?q=maxStringContentLength

However, I still have not found a solution that matches my needs. I have an MVC3 app connecting to a REST app which was build in WCF 4.0.

So far I have…

<standardEndpoints>
  <webHttpEndpoint>
    <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="false" defaultOutgoingResponseFormat="Json" crossDomainScriptAccessEnabled="true" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"  />
  </webHttpEndpoint>
</standardEndpoints>

The REST server part works. It allows me to pass in a large model with a long string value as one of it’s properties. I verified that from my MVC app as I posted the model with the large bit of data, and saw that the data made it in the DB.

When the app finished the post and tried to request the data it had just saved, I get the infamous error when it tries to serialize my model…

The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.

I tried many things such as

<bindings>
  <webHttpBinding>
    <binding>
      <readerQuotas maxStringContentLength="2147483647"/>
    </binding>
  </webHttpBinding>
</bindings>

I am retrieving the rest data by using the WebChannelFactory and then creating a channel to the interface.

string uri = "http://localhost/RestService";
WebChannelFactory<IRestService> _cf = new WebChannelFactory<IRestService>(new Uri(uri));
IRestService service = _cf.CreateChannel();

But nothing as worked so far. Is there something I am missing in my MVC3 app that will allow the model to be serialized correctly?

I know with WCF 4 there is no .svc file, and no bindings and such, but I am at a loss as to what I need to throw in the MVC app to allow the default configuration of REST to be changed.

  • 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-25T11:32:23+00:00Added an answer on May 25, 2026 at 11:32 am

    Look at the code in the answer to this question to see how to see the max string length is set. Seems like that approach would work for you.

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

Sidebar

Related Questions

I realize this question has been asked several times in several different forms ,
I realize that this question has been asked and has been answered here but
I realize that this question has been asked 100times but none that I have
I realise this question has been asked 100 times, but i've looked through the
I realize that this question has been asked before - but none of the
I know this has been a question asked many times and I wish there
I feel like this question has been asked many times, but the solution is
I realize this question is very likely to have been asked before, but I've
I realize this has been asked before, but I wasn't able to find a
I know this question has been asked before, but none of the existing SO

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.