Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAFileUp, create object prob.plz

Status
Not open for further replies.

gavray

Programmer
Jul 17, 2000
65
GB
Hi,<br><br>can anyone enlighten me please?<br><br>I have placed a safileup.dll on the root of the web server, as was instructed from the help menu.<br><br>I don't see how that relates to Set up1 =Server.CreateObject(&quot;SoftArtisans.FileUp&quot;)<br><br>This is the error message I get:<br><br>Server object error 'ASP 0177 : 800401f3' <br>Server.CreateObject Failed <br>/upload.asp, line 14 <br>800401f3<br><br>here's my form & .asp page, I'm using microsoft personal webserver<br><br>*FORM*<br><br>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;<br><br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Untitled&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>&lt;form method=&quot;post&quot; action=&quot;upload.asp&quot; enctype=&quot;multipart/form-data&quot;&gt;<br>&lt;p&gt;Email Address: &lt;input type=&quot;text&quot; name=&quot;email&quot; size=&quot;50&quot; maxlength=&quot;100&quot;&gt;&lt;br&gt;<br>image:&lt;input type=&quot;file&quot; name=&quot;myfile&quot;&gt;&lt;/p&gt;<br>&lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;upload&quot; name=&quot;B1&quot;&gt;&lt;/p&gt;<br><br><br>&lt;/form&gt;<br><br><br>&lt;/body&gt;<br>&lt;/html&gt;<br><br>*ASP*<br><br>&lt;%<br>dim status, email, image, rs, cn, strSQL, f1, newpath, cstring<br><br>cstring = &quot;dsn=profile;&quot;<br><br>' ** The status variable is used to determine whether <br>' ** Everything was successfull or not<br>status = &quot; &quot;<br><br>'** create the file upload object<br>Set up1 = Server.CreateObject(&quot;SoftArtisans.FileUp&quot;)<br><br>'** Check to make sure that it is a JPEG file. This application requires<br>'** a JPEG file with a &quot;.jpg&quot; extension. This may or may not be necessary.<br>'** However, it is important in any case to the file type, which<br>'** can.be derived form the file extension.<br>if TRIM(upl.UserFileName) &lt;&gt; &quot;&quot; then<br>if InStr(LCase(up1.UserFileName), &quot;.jpg&quot;) = 0 then<br>status = &quot;photo file is incorrect format. It must be .jpg format.&quot;<br>end if<br>end if<br><br>'** check to make sure that a file was uploaded<br>if up1.Form(&quot;myfile&quot;).IsEmpty then<br>status = &quot;photo was not uploaded&quot;<br>end if<br><br>'** check to make sure an email address was supplied<br>if up1.Form(&quot;email&quot;).IsEmpty then<br>status = &quot;no email address was supplied&quot;<br>end if<br><br>'** if everything is in order save the image and record the file name in the database<br>if status = &quot; &quot; then<br><br>'** get the path to the image location of the profile database profile images<br>f1 = server.MapPath(&quot;_private/images/&quot;)<br><br>'** add the file name to the path<br>newpath = f1 & up1.UserFileName<br><br>'** update the redcord containing the new image with the file name<br>set cn = Server.CreateObject(&quot;adodb.Connection&quot;)<br>cn.Open csstring<br>strSQL = &quot;UPDATE profile set image = '&quot; & up1.UserFileName & &quot;' where email&quot; & _<br>&quot;like '&quot; & email & &quot;'&quot;<br>cn.Execute(strSQL)<br>cn.Close<br>Set cn = Nothing<br><br>'** save the file to the correct location<br>up1.SaveAs newpath<br>status = &quot;Your photo has been uploaded.&quot;<br>else<br><br>'** clear the file form memory on the server<br>up1.Flush<br>session (&quot;message&quot;) = status<br>end if<br>Set up1 = Nothing<br>%&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Untitled&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>&lt;p align=&quot;center&quot;&gt;&lt;font size=&quot;4&quot;&gt;&lt;strong&gt;profile image update&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;<br>&lt;!--display status message--&gt;<br>&lt;p align=&quot;center&quot;&gt;&lt;%=status%&gt;&lt;/p&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br><br>i'd be gratefull for some hints<br><br>Gavin <br><br>
 
Here's what it says in the soft artisans documentation regarding this:<br><br><b>What does this error mean: &quot;Server object error 'ASP 0177:80040154' Server.CreateObject Failed&quot;</b><br>That is a &quot;Class not registered&quot; error. Try running regsvr32 on the DLL once again and see if any errors appear during registration.<br><br>You can also check the Registry manually. Look for:<br><br> HKEY_CLASSES_ROOT\SoftArtisans.FileUp\CLSID<br>which should have a value of FB3F89EF.<br><br>If the error persists, even after you have checked the registry, check the NTFS permissions on the SAFILEUP.DLL file.<br><br>IIS, which typically executes as IUSR_machinename, must have read and execute permission to both this file and the directory where it is located.<br><br>If the CreateObject fails, SA-FileUp can't return any diagnostic information. If you have the Win32 SDK, errors such as 8nnnnnnn can be found in include\winerror.h.<br> <p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top