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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:01:47+00:00 2026-05-23T00:01:47+00:00

I am specifying maxItemsInObjectGraph in the server config file but while creating client config

  • 0

I am specifying maxItemsInObjectGraph in the server config file but while creating client config file, this attribute is ignored and i have to manually add it in the endpointBehaviors section.

Is there a way i can make some changes in the config file so that everytime i generate client config and proxy via Svcutil.exe, this behaviour is automatically included in the client config file?

i tried ading [ServiceBehavior(MaxItemsInObjectGraph = 2147483647)] to the service interface but it gives me an error saying Attribute 'ServiceBehavior' is not valid on this declaration type. It is only valid on 'class' declarations.

  • 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-23T00:01:48+00:00Added an answer on May 23, 2026 at 12:01 am

    No, that is another behavior which is configured per participant. Each client has control over this property and service doesn’t expose this property because it could be considered as security issue.

    If your problem is mainly about development (where you don’t want to modify your behavior every time you refresh the reference) you can use commonBehaviors section which can be defined only in machine.config:

    <commonBehaviors>
      <behaviors>
        <endpointBehaviors>
          <dataContractSerializer maxItemsInObjectGraph="..." />
        </endpointBehaviors>
      </behaviors>
    </commonBehaviors>
    

    Common behaviors are added to every service / endpoint running on the machine. It is perhaps good for development but you mustn’t forget that once you will prepare package for production you will have to add this configuration to production’s config file – because of that it is better to maintain such configuration file continuously and use it on some build / test server.

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

Sidebar

Related Questions

I have tried this, specifying the assembly name: Type.GetType(string.Format({0}.{1}, {0}, typeToLoad.AssemblyName, typeToLoad.ClassName)); Which throws
How can I add a file to an InstallShield component specifying a relative path
I'm specifying my doctype as xhtml strict, but it's being sent over the wire
What is the web config syntax for specifying a WCF WebService Proxy's Default Target
I have a webservice that when called without specifying a callback will return a
I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing
When specifying my script file in setup.py, e.g. script: 'pythonturtle.py', how can I specify
I have requirement of specifying web part connections in onet.xml. So when site is
Is it possible when specifying a jQuery UI dialog box, to have an image
I am have some trouble specifying a custom icon in my WPF applicaion. I

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.