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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:37:58+00:00 2026-05-23T21:37:58+00:00

When calling a WCF service from Silverlight that works for smaller parameters, but fails

  • 0

When calling a WCF service from Silverlight that works for smaller parameters, but fails for larger ones (with a “400:Bad Request” response), how can you configure the server to accept a larger number of parameters?

Long Version:
I am attempting to call a WCF service from Silverlight, and I am passing a List of Guids that contains 2000 Guids. The service call works for up to 1100 (exactly), but anything past that will result in an error. I looked at the response with Fiddler, and I am getting a response code 400 (Bad Request). I believe this to be a configurable parameter, but I am not sure what setting needs to be changed. I am not 100% confident that my config file settings are being applied as I am intending since I don’t know how to check programmatically that these settings are being used. However, I have tried setting maxRequestLength, maxQuestyStringLength, and maxUrlLength of the httpRuntime element under system.web to extremely high values with no change. I have set maxReceivedMessageSize, maxBufferPoolSize, and maxBufferSize of the httpTransport element of a custom binding to high values with no effect. I have set maxDepth, maxArrayLength, maxBytesPerRead, maxNameTableCharCount, and maxStringContentLength of the readerQuota element of a basicHttpBinding also with no effect.

If it isn’t obvious by now, I am taking random stabs in the dark based on recommendations from several places online, but nothing has had any effect. If someone knows conclusively which attribute I should be setting so that I can try again, I would greatly appreciate some knowledgable advice. Also it would be especially helpful if someone has advice about how I can check programmatically what settings are being used from my config file, that would at least allow me to confirm that the things I have already tried are being applied in the way I think they are.

UPDATE:
Looking at the situation a little closer, my problem is very similar to that described in
Large WCF web service request failing with (400) HTTP Bad Request.
I did not believe that to be the same issue because I set maxReceivedMessageSize as described in the solution and it didn’t fix the problem. However, I think that my web.config is not being applied correctly because I just checked the size of the message in fiddler, and the last successful call (1100 Guids) causes the message size to be 65481, and the first failed request happens with message size 65540. That puts it just over the 65536 default limit.

Here is my current web.config serviceModel section:

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="basicHttpBinding" closeTimeout="01:00:00"
                openTimeout="01:00:00" receiveTimeout="01:00:00"
                sendTimeout="01:00:00" maxBufferPoolSize="2147483647"
                maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
                    <readerQuotas maxDepth="2147483647"
                        maxStringContentLength="2147483647"
                        maxArrayLength="2147483647" />
            </binding>
        </basicHttpBinding>
    </bindings>
    <services>
        <service behaviorConfiguration="ReportDataServiceBehavior"
            name="DSTM.Reporting.ReportDataService">
            <endpoint address="" binding="basicHttpBinding"
                contract="DSTM.Reporting.IReportDataService" />
            <endpoint address="mex" binding="mexHttpBinding"
                contract="IMetadataExchange" />
        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="ReportDataServiceBehavior">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="true" />
                <dataContractSerializer maxItemsInObjectGraph="2147483647" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
</system.serviceModel>

How can I ensure that my service is using the binding that I am expecting?

  • 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-23T21:37:58+00:00Added an answer on May 23, 2026 at 9:37 pm

    You have binding="basicHttpBinding" in your endpoint declaration, which instructs the service to use the built-in WCF binding BasicHttpBinding. However, it will not use your customized binding unless you add bindingConfiguration="basicHttpBinding" to reference the specific binding that you have defined. You may also want to change the name of your <binding> to make it more clear that you are referencing your binding configuration, and not the basicHttpBinding itself.

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

Sidebar

Related Questions

I have a WCF service that I am calling from multiple clients. I need
There is a Silverlight (4.0) application that is calling to WCF-service. During 1st call
I'm fetching data (images, 200-400kb) from WCF service to Silverlight client and notice that
I'm calling a WCF service from a Silverlight client, therefore making all the calls
I am calling a WCF service from some stub. The issue is that, I
Hi All I am currently having an issue calling a WCF service from a
I have a Windows program that calling a WCF service. This service after a
this is my first WCF service. I defined a response message that derives from
Does anyone have any good examples of calling a WCF service from a classic
I am calling a WCF service that is bundling the data into a List

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.