serialization error : need to change maxStringContentLength default setting

J

John Grandy

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.
 
M

Mr. Arnold

John said:
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?
 
M

Mr. Arnold

John said:
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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top