Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Do webservices have a parameter length limitation?

Reply
Thread Tools

Do webservices have a parameter length limitation?

 
 
Al Knowles
Guest
Posts: n/a
 
      08-29-2003
I am calling a web service from a VB6 application using the following
code. The idea is to pass a file (stored in XML) to the service for it
to be stored on the server. Everything works as expected unless the
file size is greater than around 2500kb. At the point, the webservice
doesn't respond at all. It won't even activate to the point where I can
debug.

Is there a limit to the length of the string that can be posted to a web
service? If so, it it overridable? Or is this an option that can be
set on IIS?

Any responses greatly appreciated. Thanks in advance.

Public Sub wsStoreObject()

Dim xXMLHTTP As New XMLHTTP ' XMLHTTP

Dim xResponse As String
Dim xURL As String 'Web service url
Dim xSendParms As String

'>>> Web service parameters
Dim iBinStream As String
Dim iDirectory As String
Dim iName As String
Dim iOverwrite As String
Dim iOptions As String
Dim iFileLen As Long
Dim iFileType As String


Dim ll_callnum As Integer

On Error GoTo oops:

ll_callnum = ll_callnum + 1

Dim ls_shortfilename As String
Dim ls_path As String
Dim ls_longname As String

ls_shortfilename = "test.oin"

ls_path = "d:\images\"

ls_longname = ls_path + ls_shortfilename
iBinStream = SerializeImageToXML(ls_longname)

'>>> Set web service url

xURL = "http://idev/ccms/eservices/CCMSService.asmx/StoreObject"

'>>> set XMLHTTP object
xXMLHTTP.Open "POST", xURL
xXMLHTTP.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"


iDirectory = "Image"
iName = ls_shortfilename
iOverwrite = "TRUE"
iOptions = "TheOptions"



'>>> Concatenate individual parms into the xSendParms variable
xSendParms = "iBinStream=" & iBinStream & "&"
xSendParms = xSendParms & "iDirectory=" & iDirectory & "&"
xSendParms = xSendParms & "iName=" & iName & "&"
xSendParms = xSendParms & "iOverwrite=" & iOverwrite & "&"
xSendParms = xSendParms & "iOptions=" & iOptions


'>>> Call web service and pass its parameters
xXMLHTTP.send xSendParms



'>>> Loop until the call comes back
Do Until xXMLHTTP.readyState = 4
DoEvents
Loop

'>>> When exiting the loop, get the response from the webservice
xResponse = xXMLHTTP.responseText

' >>xResponse is empty if file size over about 2500 KB

Set xXMLHTTP = Nothing

Exit Sub

oops:


MsgBox Err.Description


End Sub




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Server Error in '/' Application, Length cannot be less than zero. Parameter name: length Yugioh017@yahoo.com ASP .Net Security 0 02-11-2007 06:31 AM
911...Need Help! : Length cannot be less than zero. Parameter name : length manmit.walia@gmail.com ASP .Net 2 01-10-2006 03:29 PM
Length cannot be less than zero. Parameter name: length ctk70 ASP .Net Security 2 02-10-2005 05:29 PM
System.ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: length =?Utf-8?B?SG96aQ==?= ASP .Net 1 06-01-2004 11:06 PM
How to get length of string? length() problems Mitchua Perl 5 07-17-2003 12:08 AM



Advertisments