http post give me is 414 Request-URI Too Large" Error Message from ISA Server

569 views
Skip to first unread message

test

unread,
Feb 13, 2010, 10:08:11 AM2/13/10
to MailChimp API Discuss
when i do a http post with listbatchsubscribe with 200 email it
returns an error with is 414 Request-URI Too Large" Error Message from
ISA Server. i am not sure what's the exact limit on the http load
function but if i remember correctly from the documentation, it should
be 5000. but when i got batch[0]
[email]=.........to............batch[200].....it just gave me the
message above. the limit might be less than that because i also try a
hundred and it also crashed. so i was just wondering if i did
something wrong. thank for your help


Dim doc As XmlDocument
Dim nodes As XmlNodeList
doc = New XmlDocument()
doc.Load(http://......................?
method=listbatchsub......batch[0]......to..........batch[100])

DavidMcL, Perceptive Logic

unread,
Feb 13, 2010, 12:03:18 PM2/13/10
to MailChimp API Discuss
I ran into this problem too, but the solution is not too difficult.

For large requests, rather than use a GET or POST uri string, you'll
need to do a POST by using a Form Encoded Data request (application/x-
www-form-urlencoded).

dbm

test

unread,
Feb 14, 2010, 12:33:08 AM2/14/10
to MailChimp API Discuss
this is what i did and it just doesn't work. if you see any error
please let me know. thank you
Dim request As WebRequest = WebRequest.Create("http://yourserver/
receive.aspx")


' Set the Method property of the request to POST.
request.Method = "POST"
' Create POST data and convert it to a byte array.
Dim postData As String = "method=listbatchsubscribe&batch[0]
[email]=dd...@ss.com......to batch[200]......"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
' Set the ContentType property of the WebRequest.
request.ContentType = "application/x-www-form-urlencoded"
' Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length

' Get the request stream.
Dim dataStream As Stream =
DirectCast(request.GetRequestStream(), Stream)
' Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length)
' Close the Stream object.
dataStream.Close()
' Get the response.
Dim response As WebResponse =
DirectCast(request.GetResponse(), WebResponse)

test

unread,
Feb 14, 2010, 1:53:47 AM2/14/10
to MailChimp API Discuss
got it. thank you all.
Reply all
Reply to author
Forward
0 new messages