Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 11th, 2005, 08:50 AM
Registered User
 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Publish ASP.Net Code with cmd Line using Process rhd110 General .NET 0 February 2nd, 2008 03:26 PM
(0x800A0046) Permission denied,not IIS permission! David Hay Classic ASP Basics 3 April 30th, 2006 10:47 PM
Permission denied tksarun Classic ASP Components 0 March 11th, 2005 03:01 AM
Permission Denied hamidmq Javascript How-To 2 March 10th, 2005 09:41 AM
Running cmd line .EXE through PHP geolast PHP How-To 2 January 6th, 2005 02:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.