all groups > dotnet xml > april 2005 >
You're in the

dotnet xml

group:

passing XML querystring


passing XML querystring smarcinek NO[at]SPAM interia.pl
4/26/2005 10:24:21 PM
dotnet xml:
i want to pass XML data in querystring from one to another asp page.
it is about 10000 characters long, i cannot use FORM because it is
already nested in one.
What i do is i have IFRAME and im passing some xml data
in QUERYSTRING. It doesnt work somehow, im using javascript escape
method to substitute escape characters, but most of characters are
being truncated (about 300-500 left).
Are there limits in querystring length?
what else should i try??

Re: passing XML querystring Dennis Myrén
4/27/2005 12:00:00 AM
Can't you use POST?
Post it like this:
public static void PostData ( string destURL, string data )
{

WebRequest r = WebRequest.Create(destURL);
r.Method = "POST";
r.ContentType = "application/x-www-form-urlencoded";
StreamWriter w = new StreamWriter(r.GetRequestStream());
w.Write(data);
w.Close();
}


Then use Request.InputStream to read the data.

PS
Yes there is a limit for the querystring length, although i am not sure what
it is.
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
[quoted text, click to view]

Re: passing XML querystring Joerg Jooss
4/27/2005 12:44:09 PM
[quoted text, click to view]

Forget about that. URLs are not meant (read "specified") to transport
such payload. Any upstream HTTP processor may simply truncate the URL.

[quoted text, click to view]

Yes. There's no specified maximum length, but experience shows that
query strings longer than 2 kB are to avoided.

[quoted text, click to view]

HTTP POST.

Cheers,
--
http://www.joergjooss.de
AddThis Social Bookmark Button