upload asp
Når jeg uploader et dokument på min egen maskine er der ingen problemer. Ligeså snart jeg ligger mit site på serveren kan jeg ikke uploade mere ??Jeg får denne fejl :
Error Type:
ASPSimpleUpload.Upload, ASP 0174 (0x80004005)
An invalid \'/\' or \'\\\' was found in the Path parameter for the MapPath method
/dev/projects/upload/uploadpro.asp, line 26
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Page:
POST 19815 bytes to /dev/projects/upload/uploadpro.asp
POST Data:
error \'80020009\'
Exception occurred.
/iisHelp/common/500-100.asp, line 192
Mit upload script ser sådan ud:
<%thisuser = session(\"devusername\")%>
<html>
<head>
<link rel=\"stylesheet\" href=\"/dev/dev.css\">
<script>
<!--
function uploadComplete(NewFileName){
var oldChild=opener.document.getElementById(\"file\").childNodes[0]
var newText=opener.document.createTextNode(NewFileName)
opener.document.getElementById(\"file\").replaceChild(newText,oldChild)
opener.document.postform.upfile.value=NewFileName
opener.focus();
self.close();
}
//-->
</script>
</head>
<body>
<%
Dim upl, NewFileName , newFileExt,upfile
Set upl = Server.CreateObject(\"ASPSimpleUpload.Upload\")
upfile=upl.form(\"File1\")
NewFileName = \"/dev/releases/uploads/\"& thisuser & \"/\" & upl.ExtractFileName(upfile)
If upl.SaveToWeb(\"File1\", NewFileName) Then
Response.Write(\"<body onload=\"\"self.focus();\"\">\")
Response.Write(\"<center>File successfully uploaded.<br><br>\")
Response.write (\"<input type=\"\"button\"\" value=\"\"click to proceed\"\" class=\"\"cmdflat\"\" onclick=\"\"uploadComplete(\'\"&upl.ExtractFileName(upfile)&\"\');\"\"></center>\")
Response.Write(\"</body>\")
Else
Response.Write(\"There was an error saving the file to disk.\")
End If
set upl=nothing
%>
</body>
</html>