|
 |
asp_components thread: problem in ASPExec
Message #1 by "Sameer Valluri" <sameer.valluri@i...> on Wed, 18 Sep 2002 10:27:05
|
|
I am using the ASPExec component to copy a text file from any location in
the IIS Server to another NT machine having IP 10.0.1.118 using the
following code:
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd /c copy c:\xyz\abcd.txt \\10.0.1.118\d\abc"
strResult = Executor.ExecuteDosApp
I get an error saying file access denied.
If I run the same command (cmd /c copy c:\xyz\abcd.txt \\10.0.1.118\d\abc)
from the command prompt of the IIS Server machine it copies successfully.
Also, if I change the destination to a Windows 98 machine and execute the
ASP page it also works.
It only seems not to work when attempting to copy the file to a NT machine
from the ASP page.
PS: I have also given full control to Everyone rights on the destination
folder.
Please suggest a solution urgently.
Message #2 by "Adrian Forbes" <adrian.forbes@n...> on Wed, 18 Sep 2002 10:22:46 +0100
|
|
Is your IIS set to anon access? If so it uses the IUSR_ account to run your
scripts and that account is local to the machine and has no access to other
machines on the domain. When you run the command from the server itself you
are using the interactive user (the one logged on).
Either change the authentication so you are not using anon, or change the
anon user account to an account that has access to the server you are
copying to.
-----Original Message-----
From: Sameer Valluri [mailto:sameer.valluri@i...]
Sent: Wednesday, September 18, 2002 10:27 AM
To: ASP components
Subject: [asp_components] problem in ASPExec
I am using the ASPExec component to copy a text file from any location in
the IIS Server to another NT machine having IP 10.0.1.118 using the
following code:
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd /c copy c:\xyz\abcd.txt \\10.0.1.118\d\abc"
strResult = Executor.ExecuteDosApp
I get an error saying file access denied.
If I run the same command (cmd /c copy c:\xyz\abcd.txt \\10.0.1.118\d\abc)
from the command prompt of the IIS Server machine it copies successfully.
Also, if I change the destination to a Windows 98 machine and execute the
ASP page it also works.
It only seems not to work when attempting to copy the file to a NT machine
from the ASP page.
PS: I have also given full control to Everyone rights on the destination
folder.
Please suggest a solution urgently.
%%email.unsub%%
Message #3 by "McAlexander, Jon" <Jon.McAlexander@g...> on Wed, 18 Sep 2002 14:58:48 -0500
|
|
Well, more than likely it is because your code is running as the user
IUSR_MACHINENAME which is a local user on your IIS box. This user does not
have rights outside of itself. Try setting the application to not run as
anonymous and see if it works.
Jon McAlexander
Gateway
Senior Engineer IT - Intranet
Ext. 22560, Direct xxx-xxx-xxxx
-----Original Message-----
From: Sameer Valluri [mailto:sameer.valluri@i...]
Sent: Wednesday, September 18, 2002 5:27 AM
To: ASP components
Subject: [asp_components] problem in ASPExec
I am using the ASPExec component to copy a text file from any location in
the IIS Server to another NT machine having IP 10.0.1.118 using the
following code:
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd /c copy c:\xyz\abcd.txt \\10.0.1.118\d\abc"
strResult = Executor.ExecuteDosApp
I get an error saying file access denied.
If I run the same command (cmd /c copy c:\xyz\abcd.txt \\10.0.1.118\d\abc)
from the command prompt of the IIS Server machine it copies successfully.
Also, if I change the destination to a Windows 98 machine and execute the
ASP page it also works.
It only seems not to work when attempting to copy the file to a NT machine
from the ASP page.
PS: I have also given full control to Everyone rights on the destination
folder.
Please suggest a solution urgently.
jon.mcalexander@g...
%%email.unsub%%
|
|
 |