views:

205

answers:

2

I've got a customer who wants to pass in a large string to one of our web services, beyond what it is really intended for, and it seems to be truncating data somewhere along the line. Is there a maximum size for strings in web service calls?

It would be nice to say, "this isn't technically possible" rather than argue merits of limiting the size.

+1  A: 

I don't know that there is a maximum.

John Saunders
A: 

I'm not sure there's a maximum length specifically for individual parameters, but there is a maxRequestLength for the entire request length itself. This is configurable via your web.config, but a very large parameter could cause the request length to be too long.

Joseph
That sounds like it would cause an exception, though, rather than a truncation of the string.
quillbreaker
@quillbreaker You're right, but I thought that would be a good reason to give for the "not technically possible" route if you're getting anywhere close to that limitation.
Joseph
Interestingly enough, the HttpRuntimeSection.MaxRequestLength property doesn't seem to exist (or at least isn't documented) for the 1.1 runtime - the MSDN page has a page for 2.0, 3.0, 3.5, and 4.0 but not for 1.1. Nice to know, at the least, that it could break if we updated the runtime.
quillbreaker