I am using the method illustrated on this site http://www.15seconds.com/issue/990723.htm to upload multiple files
However, I am finding that I need to run it once before it works.
i.e. the first time, the Server.CreateObject makes the dll and says
"The remote procedure call failed and did not execute." or
"document contains no data"
Why is the DLL not getting loaded straight away?
The second time it works fine, presumably because the dll is loaded in memory.
I have pasted the ASP page below.
VB Code:
<%@ Language=VBScript %>
<%
Option explicit
Response.Buffer = True
On Error Resume Next
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim objUpload
Dim lngMaxFileBytes
Dim strUploadPath
Dim varResult
lngMaxFileBytes = 10000
strUploadPath = "c:\inetpub\wwwroot\upload\"
Set objUpload = Server.CreateObject("pjUploadFile.clsUpload")
I dont know about the above code, but I had downloaded another set of dlls from 15seconds.com which I've implemented and works fine. No complecations. I'm attaching the zip.
The advantage with the sample that I am using is that I can add some extra code to it.
Specifically I want to Shell an app that will process the files once they are uploaded.
I can't see a way of doing this without modifying the DLL code.
Can it be done in the ASP?
Could this Shell command be causing the error I am seeing?
If the shelled app hasn't finished by the time the ASP tries to set the object to nothing will it actually get destroyed or not?