Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > serialization error : need to change maxStringContentLength default setting

Reply
Thread Tools

serialization error : need to change maxStringContentLength default setting

 
 
John Grandy
Guest
Posts: n/a
 
      01-15-2010
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.




 
Reply With Quote
 
 
 
 
Mr. Arnold
Guest
Posts: n/a
 
      01-16-2010
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?

 
Reply With Quote
 
 
 
 
Mr. Arnold
Guest
Posts: n/a
 
      01-16-2010
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to move from java object serialization to xml serialization? Dimitri Ognibene Java 4 09-02-2006 07:32 AM
Object serialization XML vs java serialization plasticfloor@gmail.com Java 3 06-14-2006 03:45 AM
Serialization Problems and books on serialization? sinleeh@hotmail.com Java 8 01-02-2005 02:40 PM
tomcat 4.x : setting mime type for a directory or setting a default mime type CJ Java 1 10-29-2004 07:51 PM
avoiding XML serialization, different WSDL generation, soap serialization Ramunas Urbonas ASP .Net Web Services 1 07-27-2004 09:57 PM



Advertisments