Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: Request Header Limit
shaji

From: Mumbai, India
Posts: 10
Member Since: 12/20/02
posted December 20, 2002 5:45 AM

Hi,

I have developed an activex in VB 6.0 for my website to upload files

I am using the PowerTCP web controls for file transfer.

the version of dartweb.dll is 1.1.0.1 & that of dartsock.dll is 2.2.0.6

I have found that if the total length of the header is more that around 5471 chars then the files are not posted, but no error message is generated.

I would like to know if there is any limit to the requestheader that I send while posting files & how can overcome this.

thank you

K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted December 23, 2002 11:02 AM

Hi,
Please get the latest version, and see if the problem persists.
I was not able to reproduce the problem with a header that was over 50000 chars long.
Thanks,
-ken
shaji

From: Mumbai, India
Posts: 10
Member Since: 12/20/02
posted December 31, 2002 4:02 AM

I had recently downloaded the latest Dart controls

The version that I have is 1.8.0.4 for DartWeb.dll & 2.8.0.4 for DartSock.dll

But I have this problem with dart control:
When I try to upload more than 49 files then I get this error message ‘Miscellaneous Error’ & if I try to upload 49 files then I get this error message ‘The connection with the server has been terminated’

I am using the DartString object instead of the querystring to send additional information for the files.

The length of the requestheader that I am sending is 5124, & count of header information is 246.

I using the dart control in non-blocking mode.

also please send me some sample code wherein you have used the dartstring to send header information while posting files.

thank you,

Best regards

Shaji C

shaji

From: Mumbai, India
Posts: 10
Member Since: 12/20/02
posted December 31, 2002 4:04 AM

also please note that I am trying this on a Windows 2000 professional with SP3 & VB6 with SP4.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted December 31, 2002 8:45 AM

I am not sure what you mean by "The length of the requestheader that I am sending is 5124, & count of header information is 246." ? Does this mean that the header is 5124 bytes long and contains 246 lines? That seems like a rather long header.

Also, I am unclear what you mean by "I am using the DartString object instead of the querystring to send additional information for the files."

Please look into getting a support package so that you can send me some sample code.

shaji

From: Mumbai, India
Posts: 10
Member Since: 12/20/02
posted January 2, 2003 1:11 AM

Hi,

Please find a portion of the code that I was trying to execute.


-----------------------
Dim mstrPostFile As String
Dim mstrData As String
Dim mbolSend As Boolean
Dim mlngFile As Long

Dim mobjRequest As DartStrings
Dim mobjFile As DocFile
Dim mobjProperty As FileProperty
 
lobjHTTP.Timeout = 0 ' Non blocked
' function to create a single post file for all the files to be uploaded.
' lobjSendFiles is a collection of files to be uploaded.
mstrPostFile = CreatePostFile(lobjSendFiles)

Set mobjRequest = New DartStrings
' adding the mimetype
mobjRequest.Add lstrContentType & vbCrLf

For Each mobjFile In lobjSendFiles
 mlngFile = mlngFile + 1
 For Each mobjProperty In mobjFile.Properties
 ' chr(1) is used to replace vbcrlf while sending header info, as vbcrlf is a row delimiter in header info
 ' Error if empty value is sent in header info.
  If Trim(mobjProperty.Value) <> "" Then
  ' adding additional information for each file
    mobjRequest.Add mobjProperty.Description & mlngFile & ": " & Replace(mobjProperty.Value, vbCrLf, Chr(1)) & vbCrLf
  End If
 Next mobjProperty
Next mobjFile
Set mobjFile = Nothing
Set mobjProperty = Nothing

lobjHTTP.URL = lobjServer.FileURL
lobjHTTP.Post mstrPostFile, mobjRequest, mstrData
Do While lobjHTTP.State <> httpCompleted
 DoEvents
Loop
-------------------------------------------

Here in this code I'm trying to upload multiple files with additional information for each file,like Title, destination folder, comments etc.

hope this helps you understand my problem better.

thank you,

best regards

Shaji
shaji

From: Mumbai, India
Posts: 10
Member Since: 12/20/02
posted January 2, 2003 1:36 AM

Hi,

yes, the header is 5124 bytes long and contains 246 lines. Please let me know if this long, then what are the limitations

also find below the comments from Ken,

I was not able to reproduce the problem with a header that was over 50000 chars long.
Thanks,
-ken
---------------------------------

K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted January 7, 2003 11:45 AM

Hi,
Yes, I found a limit of 245 for the number of headers.
If you need more than 245, you may want to consider the WebAsp control of the Web Enterprise Tool, which does not have this limit.
(I just tried a request with 1000 header lines and it worked ok).
-ken
shaji

From: Mumbai, India
Posts: 10
Member Since: 12/20/02
posted January 14, 2003 9:03 AM

We tested the WebASP control in a sample application & have come to the following conclusion;

There is no limit to the number of files to be uploaded. but there is certainly some limit on the total file size. we confirm this because when we tried uploading files more than 56MB the files get uploaded, but at the server side the HttpRequest.files collection is still empty.

Please find below the sample code that we tried.

-----------------------------
 Dim mobjFSO As New Scripting.FileSystemObject
 Dim mobjFile As Scripting.File
 Dim mobjFldr As Scripting.Folder
 Dim mobjPostFile As DartStream
 Dim mobjPostFiles As New DartStreams
 Dim mlngFile As Long

 ' the folder referenced below contains 330 files of total size 88MB. 
 Set mobjFldr = mobjFSO.GetFolder("C:\Temp")
 
 For Each mobjFile In mobjFldr.files
  Set mobjPostFile = New DartStream
  mobjPostFile.FileName = mobjFile.Path
  mobjPostFile.Ref = mobjFile.ShortName
  mobjPostFiles.Add mobjPostFile
  Set mobjPostFile = Nothing
 Next

 With WebASP1
  .Timeout = 0
  .Request.Url = "http://192.168.0.18/testweb/Postpage.aspx?AppName=edocvault&Username=nt&Password=nt&Databaseid=1&DirectoryId=1&DirectoryDatabaseID=169"
  .Request.FilesToPost = mobjPostFiles
  For Each mobjFile In mobjFldr.files
   mlngFile = mlngFile + 1
   .Request.Variables("DatabaseID" & mlngFile) = "1"
   .Request.Variables("DirectoryID" & mlngFile) = "169"
   .Request.Variables("DirectoryDatabaseID" & mlngFile) = "1"
   .Request.Variables("Title" & mlngFile) = mobjFile.ShortName
   .Request.Variables("ContentType" & mlngFile) = "Not Specified in test application"
   .Request.Variables("Category1" & mlngFile) = "0099912414147777"
   .Request.Variables("Test" & mlngFile) = "00046547574"
   .Request.Variables("AccountNumber" & mlngFile) = "00001241414141"
   .Request.Variables("CatXXX" & mlngFile) = "3456878456" & vbcrlf & "3485783758" & "545464"
   .Request.Variables("catYYY" & mlngFile) = "6876"
   .Request.Variables("catZZZ" & mlngFile) = "00001241414141"
   .Request.Variables("catAAA" & mlngFile) = "00001241414141"
  Next
  .Post

  Do While True
   If WebASP1.Response.Status = 200 Then
    Exit Do
   End If
   DoEvents
  Loop
 End With

-----------------------------

please confirm of any limitation in the WebASP control.

thank you

best regards
Shaji
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted January 14, 2003 11:49 AM

Hi,
What happens when you use an IE form to upload these large files? Do you see the same problem on the server? It seems to me this problem is server-side.

Also, fyi, there is no reason to do the While Loop at the end of your code. Simply set the Timeout > 0. Windows events will still fire with a positive Timeout value.
Thanks,
-ken
shaji

From: Mumbai, India
Posts: 10
Member Since: 12/20/02
posted January 17, 2003 6:17 AM


When I tried to upload 3 huge files of total size 36MB, I get the following error message,

The virtual circuit was reset by the remote side executing a "hard" or "abortive" close. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, or the remote host used a "hard close". This error may also result if a connection was broken due to "keep-alive" activity detecting a failure. This error is also be reported under Windows 2000 when a UDP packet is sent to a host with no service open on the specified port.

---------------

Please explain how we can overcome this problem

thank you,

best regards
Shaji
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted January 17, 2003 11:22 AM

Hi Shaji,
Again, is this something you are able to do with IE? The error indicates the server is aborting the connection.
You could try sending the files individually, perhaps that would work.
-ken
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX