473,387 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem using cmd.exe from asp

Hi folks I have strange problem using cmd.exe from asp code

I am trying to save the results of an FTP command into a text file. When I
run this command from the command line of the web server it creates the text
file OK and it contains the results of the FTP commands.

ftp.exe -s:test.ftp > c:\tempfile.txt

However when I run it from asp using cmd.exe, it creates the file
c:\tempfile.txt but there is nothing in it.

set oScript=Server.CreateObject("WSCRIPT.SHELL")
oScript.run("cmd.exe /c ftp.exe -s:test.ftp > c:\tempfile.txt")

Any ideas why?

Thanks a lot,

Derek
Jul 22 '05 #1
4 6019
Derek Timothy wrote:
Hi folks I have strange problem using cmd.exe from asp code

I am trying to save the results of an FTP command into a text file. When I
run this command from the command line of the web server it creates the text
file OK and it contains the results of the FTP commands.

ftp.exe -s:test.ftp > c:\tempfile.txt

However when I run it from asp using cmd.exe, it creates the file
c:\tempfile.txt but there is nothing in it.

set oScript=Server.CreateObject("WSCRIPT.SHELL")
oScript.run("cmd.exe /c ftp.exe -s:test.ftp > c:\tempfile.txt")

Any ideas why?

Thanks a lot,

Derek

just a guess but permission to FTP.EXE?

--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com
Jul 22 '05 #2
Curt,

It was worth a try, but sadly I get the same problem

Am I adding permission to the correct account IUSR_ANON?

Best Regards,
Derek


"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Derek Timothy wrote:
Hi folks I have strange problem using cmd.exe from asp code

I am trying to save the results of an FTP command into a text file. When I run this command from the command line of the web server it creates the text file OK and it contains the results of the FTP commands.

ftp.exe -s:test.ftp > c:\tempfile.txt

However when I run it from asp using cmd.exe, it creates the file
c:\tempfile.txt but there is nothing in it.

set oScript=Server.CreateObject("WSCRIPT.SHELL")
oScript.run("cmd.exe /c ftp.exe -s:test.ftp > c:\tempfile.txt")

Any ideas why?

Thanks a lot,

Derek

just a guess but permission to FTP.EXE?

--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com

Jul 22 '05 #3
Derek Timothy wrote:
Curt,

It was worth a try, but sadly I get the same problem

Am I adding permission to the correct account IUSR_ANON?

Best Regards,
Derek


"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Derek Timothy wrote:
Hi folks I have strange problem using cmd.exe from asp code

I am trying to save the results of an FTP command into a text file. When
I
run this command from the command line of the web server it creates the
text
file OK and it contains the results of the FTP commands.

ftp.exe -s:test.ftp > c:\tempfile.txt

However when I run it from asp using cmd.exe, it creates the file
c:\tempfile.txt but there is nothing in it.

set oScript=Server.CreateObject("WSCRIPT.SHELL")
oScript.run("cmd.exe /c ftp.exe -s:test.ftp > c:\tempfile.txt")

Any ideas why?

Thanks a lot,

Derek


just a guess but permission to FTP.EXE?

--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com


as a test, try using an admin account as your IIS user...

--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com
Jul 22 '05 #4
Curt,

I don't have the authority to change the admin account, but I think this
problem may because the script file and the file I want to ftp are not on
the web server itself but on a network share. I am pretty sure that the
ISR_ANON has the access rights to the network share but something about
permissions must be wrong.

If I copy the ftp script to the local server then the result file is now
created but it fails to change folder to \\server\share\folder

Once again it runs OK from a command line prompt.

It must be something related to permissions but which ones?

Thanks again.

Best Regards,
Derek


"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:eC**************@tk2msftngp13.phx.gbl...
Derek Timothy wrote:
Curt,

It was worth a try, but sadly I get the same problem

Am I adding permission to the correct account IUSR_ANON?

Best Regards,
Derek


"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Derek Timothy wrote:

Hi folks I have strange problem using cmd.exe from asp code

I am trying to save the results of an FTP command into a text file.
When
I
run this command from the command line of the web server it creates the


text
file OK and it contains the results of the FTP commands.

ftp.exe -s:test.ftp > c:\tempfile.txt

However when I run it from asp using cmd.exe, it creates the file
c:\tempfile.txt but there is nothing in it.

set oScript=Server.CreateObject("WSCRIPT.SHELL")
oScript.run("cmd.exe /c ftp.exe -s:test.ftp > c:\tempfile.txt")

Any ideas why?

Thanks a lot,

Derek

just a guess but permission to FTP.EXE?

--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com


as a test, try using an admin account as your IIS user...

--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Aaron Prohaska | last post by:
I have just run into a problem where I have a page that posts back to itself to execute code, except when the page does the post back it somehow executes code that is in our home page for the site....
1
by: Joe Bloggs | last post by:
I am trying display the contents of a table in a web page, select certain rows from that table and then display the fields that I have selected (now table columns) as text in a Label object....
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
5
by: | last post by:
Hi, I'm trying to use the cookie munging session handling behaviour of asp.net instead of cookies themselves as I'm finding quite a few people are barring cookies (especially AOL users). If I...
8
by: Bob Skutnick | last post by:
Greetings, I'm hoping someone has experienced a problem I'm having: I have an existing ASP application (working fine) that uses an SSL server certificate. My user community is made up of both...
0
by: michael | last post by:
Hi. I have a problem using the CollectioEditor. In my custom control I have a public property that returns ItemList. ItemList is inherited from CollectionBase and contains very simple items...
3
by: Microsoft Newsgroups | last post by:
Hi all, I'm having an interesting problem with my IE Webcontrols. I'm using the toolbar and when I test it in my browser using "http://localhost/mysite", it works fine. Incidentally, I have...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.