# ASP out of memory error

**URL:** <https://forum.kirupa.com/t/asp-out-of-memory-error/171419>\
**Category:** programming\
**Created:** [December 5, 2005, 11:01am UTC](https://forum.kirupa.com/t/asp-out-of-memory-error/171419 "2005-12-05T11:01:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgFan](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sgFan](https://forum.kirupa.com/u/sgFan)\
**Post date:** [December 5, 2005, 11:01am UTC](https://forum.kirupa.com/t/asp-out-of-memory-error/171419/1 "2005-12-05T11:01:13Z")

</div>

Hi, I’ve been working on this ASP upload script, with a component I downloaded from [4guysfromrolla.com](http://www.4guysfromrolla.com/webtech/012401-1.shtml). All of a sudden, the other day, after a colleague of mine made minor adjustments to a for loop (which he then undid) we suddenly started receiving the following error:

```auto
Microsoft VBScript runtime error '800a0007'
Out of memory: 'GetObject'

```

The script uses an upload component called MetaBuilders.FileUp.wsc. There’s one file input box. Every time you choose a file from this, and click the add button which sits beside it, your file details then become visible below and you’re given the option to the file - using a submit button. Once you’ve finished adding the files you want, you then click ‘Upload’ and a thank you message appears on the screen.

This is the area of the script it suddenly doesn’t seem to like:

```auto
strPath = "script:" & Server.MapPath("MetaBuilders.FileUp.wsc" )
set MBRequest = GetObject( strPath )

```

This is the full code (default4.asp):

```auto

<%@ Language=VBScript %>
<% Option Explicit %>
<% response.buffer=true %>
<%
Dim strPath
Dim MBRequest

strPath = "script:" & Server.MapPath("MetaBuilders.FileUp.wsc" )
	'Response.Write strPath
	'Response.End
	set MBRequest = GetObject( strPath )

fileAddedString = MBRequest("fileAddedString")
%>

<html>

<head>
	<title>FileUp Example</title>
	<link href="../scripts/upload_email.css" rel="stylesheet" type="text/css">
</head>

<body>
<%
If MBRequest("submit") <> "Upload" then
	Dim fileAddedString
	Dim fileAddedArray
	Dim output
	Dim i

	If MBRequest("submit") = "Add" then
		Dim path
		Dim file
		Dim length
		Dim strLen
		
		path = MBRequest("upload").Path
		file = MBRequest("upload").FileName
		
		fileAddedString = fileAddedString & "," & file
		length = CLng(len(fileAddedString))
		strLen = length - 1
		fileAddedString = Right(fileAddedString, strLen)
	End If
	
	fileAddedArray = SPLIT(fileAddedString, ",")
	
	If LEN(fileAddedString) > 0 Then
		For i = 0 TO UBOUND(fileAddedArray)
			output = output & fileAddedArray(i) & "&nbsp;" & "<input type='submit' id='delete_" & i & "' value='Delete' class='bottom_submit' />"
		Next
	Else
		output = "<i>No Files Selected</i>"
	End If
	
	%>
	<form method="post" name="uploadForm" enctype="multipart/form-data" action="<%=Request.ServerVariables("url")%>">
		<div class="top_bar">
			<div class="indent">
		 	<p>Click Browse to select a file, then click Add.</p>
		    	<p><input type="file" name="upload" />
		
		 	<input type="submit" name="submit" value="Add" class="top_submit" onclick="return validate();" />
			</div>
		</div>
		
		<div class="file_details">
			<div class="indent">
				Filename
			</div>
		</div>
	
		<div class="view_file">
			<div class="indent">
				<% =output %>
			</div>
		</div>
		
		<div class="top_bar">
			<div class="indent">
		 	<input type="hidden" name="fileAddedString" value="<% =fileAddedString %>" />
		 	<input type="submit" name="submit" value="Upload" class="bottom_submit" />
			</div>
		</div>
	</form>
	<%
End If
%>

</body>

</html>

```

Has anyone seen anything like this before?  
I’d really appreciate your help.
