Solved

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

Posted on 2006-11-17
9
3,129 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Alert after MVC form submitted 1 29
Web Easy Professional 10 Embedded Facebook 1 42
Exchange OWA website Redirection 7 47
JS to redirect to prev page 8 24
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
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…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

726 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