Permission Denied using ftp cmd line
I am getting a "permission denied" message on the Oscript.run line when trying to run a cmd line ftp. I have researched various web sites for solutions. Many seem to point to IIS settings, but I cannot see anything wrong. Below is the code I am trying to run. The text file exists in the IIS directory. I'd appreciate any ideas. Thank you.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim oScript, oFileSys, strTempFile
txt_file = "test_out.txt"
Set oScript = Server.CreateObject("WSCRIPT.SHELL")
Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")
' Use cmd.exe to run ftp.exe, parsing our newly created command file
strCMD = "cmd.exe /c ftp.exe -s:" & Server.mappath(txt_file) & " ftp.sec.gov"
strTempFile = "C:\" & oFileSys.GetTempName( )
response.write strCMD
response.write strTempFile
RESPONSE.WRITE SERVER.MAPPATH("TEST_OUT.TXT")
Call oScript.run(strCMD)
Set oFileSys = Nothing
set oScript=Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
avs
|