serialization error : need to change maxStringContentLength default setting

Discussion in 'ASP .Net Web Services' started by John Grandy, Jan 15, 2010.

  1. John Grandy

    John Grandy Guest

    My WebMethod returns a custom type that contains a field/property of type

    When calling this WebMethod, I am receiving serialization errors.

    My research shows that this is related to the VS08's default setting for
    maxStringContentLength = 8192

    However, it is not clear in which files this setting should be changed.
    ( app.config , web.config , client-side , server-side )

    I do not find this setting in ASP.NET Web Service Application project's
    web.config file.

    In exactly which config files should I be changing the value of
    maxStringContentLength ?

    What is the exact config section snippet that should be changed ?

    John Grandy, Jan 15, 2010
    1. Advertisements

  2. John Grandy

    Mr. Arnold Guest

    What are you talking about a legacy Web service or a WCF Web service?
    Mr. Arnold, Jan 16, 2010
    1. Advertisements

  3. John Grandy

    Mr. Arnold Guest

    Sorry, you're talking about ASP.NET Legacy Web service and not an
    ASP.NET WCF Web service.

    The link is talking about overriding "maxRequestLength". It's the same
    kind of thing you would use to override maxStringContentLength, which an
    entry should be made in the Web.config.

    What you should do is use Google and find what the max size can be and
    set to the max size. In WCF Web service the max size for the property in
    2 trillion something as the number that can be given on the override.

    MS is leveraging ASP.NET Legacy Web service out of .NET in favor of
    ASP.NET WCF Web service in the future.
    Mr. Arnold, Jan 16, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.