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
    byte[]

    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 ?


    Thanks.
    John Grandy, Jan 15, 2010
    #1
    1. Advertising

  2. John Grandy

    Mr. Arnold Guest

    Re: serialization error : need to change maxStringContentLength defaultsetting

    John Grandy wrote:
    > My WebMethod returns a custom type that contains a field/property of type
    > byte[]
    >
    > 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 ?
    >
    >
    > Thanks.
    >
    >
    >
    >


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

  3. John Grandy

    Mr. Arnold Guest

    Re: serialization error : need to change maxStringContentLength defaultsetting

    John Grandy wrote:
    > My WebMethod returns a custom type that contains a field/property of type
    > byte[]
    >
    > 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 ?
    >
    >


    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.


    http://support.microsoft.com/kb/295626

    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
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJ
    Replies:
    1
    Views:
    1,547
    Andrew Thompson
    Oct 29, 2004
  2. Replies:
    8
    Views:
    2,219
    deadsea
    Jan 2, 2005
  3. Replies:
    3
    Views:
    1,002
  4. Dimitri Ognibene
    Replies:
    4
    Views:
    758
    Dimitri Ognibene
    Sep 2, 2006
  5. Ramunas Urbonas
    Replies:
    1
    Views:
    375
    Dino Chiesa [Microsoft]
    Jul 27, 2004
Loading...

Share This Page