Solved

Microsoft VBScript runtime  error '800a01b6' / Object doesn't support this property or method: 'Response.Form'

Posted on 2006-06-22
3
519 Views
Last Modified: 2008-01-09
Hi ,

I am having problem while trying to send variables from a page to the Upload.

Can u please help me to resolve this issue?

Thank you in advance for ur help
Emiliano



Below the error i get when I add T1=Response.Form("T1") into outputfile.asp  :
--------------------------------------------------
Microsoft VBScript runtime  error '800a01b6'

Object doesn't support this property or method: 'Response.Form'

/public/outputFile.asp, line 36
-------------------------------------------------------

I attach here the scripts:

======= UPLOAD.ASP =================
<%Sub BuildUploadRequest(RequestBin)
      PosBeg = 1
      PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(13)))
      boundary = MidB(RequestBin,PosBeg,PosEnd-PosBeg)
      boundaryPos = InstrB(1,RequestBin,boundary)
      Do until (boundaryPos=InstrB(RequestBin,boundary & getByteString("--")))
            Dim UploadControl
            Set UploadControl = CreateObject("Scripting.Dictionary")
            Pos = InstrB(BoundaryPos,RequestBin,getByteString("Content-Disposition"))
            Pos = InstrB(Pos,RequestBin,getByteString("name="))
            PosBeg = Pos+6
            PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(34)))
            Name = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))
            PosFile = InstrB(BoundaryPos,RequestBin,getByteString("filename="))
            PosBound = InstrB(PosEnd,RequestBin,boundary)
        If  PosFile<>0 AND (PosFile<PosBound) Then
                  PosBeg = PosFile + 10
                  PosEnd =  InstrB(PosBeg,RequestBin,getByteString(chr(34)))
                  FileName = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))
                  UploadControl.Add "FileName", FileName
                  Pos = InstrB(PosEnd,RequestBin,getByteString("Content-Type:"))
                  PosBeg = Pos+14
                  PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(13)))
                  ContentType = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))
                  UploadControl.Add "ContentType",ContentType
                  PosBeg = PosEnd+4
                  PosEnd = InstrB(PosBeg,RequestBin,boundary)-2
                  Value = MidB(RequestBin,PosBeg,PosEnd-PosBeg)
                  Else
                  Pos = InstrB(Pos,RequestBin,getByteString(chr(13)))
                  PosBeg = Pos+4
                  PosEnd = InstrB(PosBeg,RequestBin,boundary)-2
                  Value = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))
            End If

            UploadControl.Add "Value" , Value      
            UploadRequest.Add name, UploadControl
            BoundaryPos=InstrB(BoundaryPos+LenB(boundary),RequestBin,boundary)
      Loop
  End Sub
  Function getByteString(StringStr)
      For i = 1 to Len(StringStr)
            char = Mid(StringStr,i,1)
            getByteString = getByteString & chrB(AscB(char))
      Next
  End Function
  Function getString(StringBin)
      getString =""
      For intCount = 1 to LenB(StringBin)
            getString = getString & chr(AscB(MidB(StringBin,intCount,1)))
      Next
  End Function%>

===== outputFile.asp ==========
<!--#include file="upload.asp"-->
<%

  Response.Expires=0
  Response.Buffer = TRUE
  Response.Clear
  byteCount = Request.TotalBytes
  RequestBin = Request.BinaryRead(byteCount)
  Dim UploadRequest
  Set UploadRequest = CreateObject("Scripting.Dictionary")
  BuildUploadRequest  RequestBin
  contentType = UploadRequest.Item("blob").Item("ContentType")
  filepathname = UploadRequest.Item("blob").Item("FileName")
  filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
  value = UploadRequest.Item("blob").Item("Value")

  'Create FileSytemObject Component
  Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")

  'Create and Write to a File
  pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))-14
  Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd) & filename)
 
  For i = 1 to LenB(value)
       MyFile.Write chr(AscB(MidB(value,i,1)))
  Next
  MyFile.Close            %>


===== that's the HTML for i am using to send the variable to the upload page ======

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title></title>
</head>

<body>

  <form METHOD="Post" name="prova1" ENCTYPE="multipart/form-data" action="public/outputFile.asp" >
  t1:<input name="T1"><br>
File : <INPUT TYPE="file" NAME="blob"><BR>



         <input type="submit" name="Insert" value="" >
  </form>


</body>

</html>
0
Comment
Question by:pixer77
3 Comments
 
LVL 43

Assisted Solution

by:TimCottee
TimCottee earned 250 total points
ID: 16958854
Hi pixer77,

It should be Request.Form not Response.Form, request is input, response is output.

Tim Cottee
0
 
LVL 25

Accepted Solution

by:
kevp75 earned 250 total points
ID: 16959329
tim is correct, there is no response.form

on outputFile.asp you will have to change them to request.form, though I don't think that will work either as you are requesting a binary file from the form.

try replacing it with:
UploadRequest.Item("T1")
0
 

Author Comment

by:pixer77
ID: 16959616

For tim , you are right , I posted the wrong error, I meant :

--------------------------------------------------------------
Request object error 'ASP 0207 : 80004005'

Cannot use Request.Form

/public/outputFile.asp, line 36

Cannot use Request.Form collection after calling BinaryRead.
-------------------------------------------------------------------

For kevp75 , I tryed UploadRequest.Item("T1")  before posting and i got  different errors becasue i forgot to add Item("Value")

 UploadRequest.Item("T1").Item("Value")

thank you anyway for your help, if you let mee how to split the points  , i'll give them to both of you

cheers
emiliano

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Replacing smart quotes from word 7 67
UT-F and other ASP code. What is it for ? 3 31
Dreamweaver server behavior gone 6 108
Select2 jquery help 9 74
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now