Microsoft KB Archive/298108

= PRB: XMLHTTP Send Method Raises Error When Large Files Are PUT =

Article ID: 298108

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft XML Parser 2.5
 * Microsoft XML Parser 2.6
 * Microsoft XML Core Services 4.0
 * Microsoft XML Core Services 4.0
 * Microsoft Windows 98 Standard Edition

-



This article was previously published under Q298108



SYMPTOMS
When you use the send method of the IXMLHTTPRequest object to PUT a large file to a Web server, you receive the following error message:

Not enough storage available for the operation.

The error occurs on Windows 98 clients, but does not occur on Microsoft Windows 2000 clients. The more memory that a client has, the larger the file that can be sent.



CAUSE
Microsoft is currently investigating the cause of this error.



Steps to Reproduce Behavior
NOTE: Because the error occurs on Windows 98 clients that have limited memory, test on a Windows 98 system that has 16 to 32 megabytes (MB) of memory.  Create a large document, such as a 60-MB bitmap, on the client. Create or select a virtual folder on your Web server where the client is to PUT the file. Grant write permissions for the virtual folder to the client. In Microsoft Visual Basic version 6.0, create a new Standard EXE project. Form1 is created by default. Add a command button to Form1.  Paste the following code in the Click event of the command button: On Error GoTo ExitHandler Dim LlFileLength As Long Dim Lvarbin As Byte Dim LobjXML As Object Dim LstrFileName As String Dim LvarBinData As Variant dim PstrFullfileName as string dim PstrTargetURL as string

' Create the XMLHTTP object and post the data to the server. Set LobjXML = CreateObject(&quot;Microsoft.XMLHTTP&quot;) PstrFullfileName = &quot;C:\largefile.bmp&quot; LlFileLength = FileLen(PstrFullfileName) - 1

' Read the file into a byte array. ReDim Lvarbin(LlFileLength) Open PstrFullfileName For Binary As #1 Get #1,, Lvarbin Close #1

' Convert to variant to PUT. LvarBinData = Lvarbin PstrTargetURL = &quot;Http://Servername/foldername&quot;

' Put the data to the server, false means synchronous. LobjXML.Open &quot;PUT&quot;, PstrTargetURL, False

' Send the file in. LobjXML.Send LvarBinData Set LobjXML = Nothing

ExitHandler: If (Err.Number <> 0) Then MsgBox Err.Description End If                   </li> Set PstrFullfileName as a valid file name on the client, and set PstrTargetURL as a valid URL.</li> Run the project and click the command button.</li></ol>

Keywords: kbprb kbpending KB298108

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.