Solved

Persits.Upload.1 error '800a0028'  Error in ASP Form

Posted on 2006-11-17
9
3,098 Views
Last Modified: 2012-06-22
I have a form on a webpage on my site where people input information and upload pictures . The webpage is caled Ladiesapplication.asp.    When the Submit button was pushed the information would go into a Access database on the host server and the pictures would go into a file.  Recently I changed my hosting company from webhost4life to Godaddy and now when I  attempt to use the form I am getting the following error message:
(Note:  I have pasted the upload.asp)

c:\hosting\webhost4life\member\misnstt\uploaded\SMithJohn
Files:

Persits.Upload.1 error '800a0028'

This feature has been disabled by system administrator. Use File.SaveAsVirtual instead.

upload.asp, line 63
*********************************************************************************************

Thie Is The Upload.asp___________________________________________________________________
<%

Set Upload = Server.CreateObject("Persits.Upload")
upload.save
%>

<%
address = upload.form("address")
lastname = upload.form("lname")
firstname = upload.form("fname")
mmth = upload.form("mmth")
mday = upload.form("mday")
myr= upload.form("myr")
citytown = upload.form("citytown")
email = upload.form("email")
hphone = upload.form("hphone")
wphone = upload.form("wphone")
cphone = upload.form("cphone")
mlookage = upload.form("mlookage")
languages = upload.form("lanaguages")
religion = upload.form("religion")
mmar = upload.form("mmar")
mchild = upload.form("mchild")
profession = upload.form("profession")
mheight = upload.form("mheight")
mweight = upload.form("mweight")
measurments = upload.form("measurments")
hobbies = upload.form("hobbies")
notes = upload.form("notes")
details = upload.form("details")

Function CheckString(byval strText)
    strText = Replace(strText, "'", "''")
    If strText = "" Then
        CheckString = "Blank"
    Else
       CheckString = strText
    End if
End Function

function checkstring2(byval strtext)
      strtext = replace(strtext, "'","")
      checkstring2 = strtext
end function

%>

<%
foldername = checkstring2(lastname) + checkstring2(firstname)
filepath = "c:\hosting\webhost4life\member\misnstt\uploaded\" & foldername
response.write filepath & "<br>"
upload.createdirectory filepath, True
%>

Files:<BR>
<%
set conn = server.createobject("adodb.connection")
constr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\info.mdb")
conn.open constr

Set rs = Server.CreateObject("adodb.recordset")
For Each File in Upload.Files
file.saveas filepath & "\" & file.filename
fname = file.filename
response.write fname & "<br>"
sqlstr = "Insert into FileName(foldername, filename) Values('" & foldername & "', '" & fname & "')"
conn.execute(sqlstr)
Next

%><%
conn.close
set conn = nothing
set constr = nothing
%><%
set conn = server.createobject("adodb.connection")
constr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\info.mdb")
conn.open constr


valuestr = "values('" & foldername & "', '" & checkstring(lastname) & "','" & checkstring(firstname) & "', "
valuestr = valuestr & "'" & checkstring(mmth) & "','" & checkstring(mday) & "','" & checkstring(myr) & "','" & checkstring(address) & "'"
valuestr = valuestr & ",'" & checkstring(citytown) & "','" & checkstring(email) & "','" & checkstring(hphone) & "','" & checkstring(wphone) & "'"
valuestr = valuestr & ",'" & checkstring(cphone) & "','" & checkstring(mLookAge) & "','" & checkstring(languages) & "','" & checkstring(religion) & "'"
valuestr = valuestr & ",'" & checkstring(mMar) & "','" & checkstring(mChild) & "','" & checkstring(profession) & "','" & checkstring(mHeight) & "'"
valuestr = valuestr & ",'" & checkstring(mWeight) & "','" & checkstring(Measurments) & "','" & checkstring(Hobbies) & "','" & checkstring(Notes) & "','" & checkstring(Details) & "')"
sqlstr = "Insert into data(foldername, lname, fname, mMth, mDay, mYr, address, citytown, email, hphone, wphone, cphone, mLookAge,"
sqlstr = sqlstr & " languages, religion, mMar, mChild, profession, mHeight, mWeight, Measurments, Hobbies, Notes, Details)"
sqlstr = sqlstr & valuestr

conn.execute(sqlstr)

conn.close
set conn = nothing
set constr = nothing
%><%
response.redirect("thankyou.asp")
%>
0
Comment
Question by:cbomik
  • 5
  • 2
9 Comments
 
LVL 9

Expert Comment

by:blandyuk
ID: 17971157
You can use the:
Upload.SaveAsVirtual "[virtual-path]"

If you are storing files in say:
www.mydomain.com/files/
----------------
Upload.SaveAsVirtual "/files/"

and then simply use the File object to get the file names.
0
 

Author Comment

by:cbomik
ID: 17971363
Im sorry I am a novice at this.  I didnt develop that Upload.asp form I paid a person.  Could you tell me where I will put that path within the Upload.asp? And more or less how I would write it?
THanks
0
 
LVL 9

Expert Comment

by:blandyuk
ID: 17971608
Ah :) OK. The "Upload.Save" function saves the file data into memory, from there you can use the File object to save them off. This is what your script is currently doing. In order to change this, find the following code:

<%
Set Upload = Server.CreateObject("Persits.Upload")
upload.save
%>

and change it to:

<%
Set Upload = Server.CreateObject("Persits.Upload")
Upload.SaveAsVirtual "/files/"
%>

You'll need to create that directory in the root folder of the website, (root being the top level directory). This "should" save the files in there. You probably need to set Write permissions on that folder from IIS. Try it anyway, if you get "Access Denied" that you'll need to do that.

Very messy script that thou :( Can be done a lot better.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 9

Expert Comment

by:blandyuk
ID: 17971612
Your website wouldn't be:

http://www.colombianbeautiesonline.com/

by any chance lol ;)

Google Search for: Ladiesapplication.asp
0
 

Author Comment

by:cbomik
ID: 17996321
Hello,
Yes that is me
I will set you up with all you want if you can figure this out for me.

I changed host companies because I thought that was the problem.

Now I am getting this:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/upload.asp, line 3

800401f3
0
 
LVL 9

Expert Comment

by:blandyuk
ID: 18000057
Line 3 is:
-------------
Set Upload = Server.CreateObject("Persits.Upload")
-------------

Try this instead, it's normally how you call the Persits Upload object:

-------------
Set Upload = Server.CreateObject("Persits.Upload.1")
-------------

If you still get, "Server.CreateObject Failed", then it looks like there is something wrong with the object on the server as it should at least create the object.

I could have a look for you and see if I can provide a solution. I'll obviously need details with regards to gaining access etc. Obviously you would be entailing trust in me here but I am ok :)

Contact me via my contact page at:
http://www.blandyuk.co.uk/contact.asp
0
 
LVL 9

Accepted Solution

by:
blandyuk earned 500 total points
ID: 18107782
Just to update everyone on this, I have re-coded the page and it now works :) His new provider used a different Upload object, simply a matter of changing the script it utilise it. Also had to get his provider to set "write" permissions on a particular folder.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

706 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

12 Experts available now in Live!

Get 1:1 Help Now