I`m pretty much new to ASP, and this code was here before me. I really do need assistance. I tried to get a more verbose error but I have not been able to do so.
I get this error when I try loading an image to the server:
500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.
Here is the code snippet:
HTML
<form action="upload_vehicle.asp" method="post" enctype="multipart/form-data">
<input type="file" name="file1"><br />
<input type="hidden" name="vID" value="<%=vID%>">
<input type="submit" value="UPLOAD PHOTO"><br /><br />
</form>
Inside upload_vehicle.asp
Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False ' Generate unique names
'For Large Photos
Server.ScriptTimeout = 60000
filepath= "c:/www/harteauto/img/Vehicles/upload/" 'Upload area for photos
Upload.Save filepath
'Response.Write("HERE2")
'Response.End
For Each File in Upload.Files
uphoto= File.ExtractFileName
next
Response.Write("HERE")
Response.End
I get output before the for loop, but once I get to it, it fails horribly! I found this info in the log of the IIS Server
LIST - 226 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c /harteauto/Admin/inc TYPE I 200 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c - TYPE A 200 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c - SIZE upload_vehicle.asp 213 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c /harteauto/Admin/inc/upload_vehicle.asp MDTM upload_vehicle.asp 213 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c /harteauto/Admin/inc/upload_vehicle.asp PORT 174,116,115,42,207,82 200 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c - DataChannelOpened - - 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c - DataChannelClosed - - 0 0 4cad67e1-3215-4611-bb36-2570a5ed459c -
I compared privileges to another project and could NOT see anything that was different. Please help me!!
UPDATE Retrieved a more detailed error code using FF.
CTRL + ALT + K opens console in FF
A form was submitted in the windows-1252 encoding which cannot encode all Unicode characters, so user input may get corrupted. To avoid this problem, the page should be changed so that the form is submitted in the UTF-8 encoding either by changing the encoding of the page itself to UTF-8 or by specifying accept-charset=utf-8 on the form element.
TO DO - DID NOT WORK Attempt this solution
UPDATE 2 - The SOLUTION
Enable ASP to return Error Messaging. This displayed a much more verbose error stating the path on the server was incorrect. Issue persisted since there were other paths that required to be fixed. Unsure why this was the cause but I suspect it affects other projects as well.