Using a domain account as the anonymous user for file copy over network

From: Colin Steadman (colin.steadman_at_gmail.com)
Date: 02/25/05


Date: 25 Feb 2005 07:15:13 -0800

I have a VBS script which contains an array of files and locations.
The script loops through array trying to find each file in the
location specified. If found the script moves the file to another
location (typically on another server).

The script is run by Task Scheduler every few minutes, and is run
under a domain account.

What I need to do now is move this functionality into an ASP page. A
suggestion from an ASP group was to put the script into an ASP page
and move the ASP page into a new 'Virtual Folder' that runs under the
domain account I was using in Task Scheduler.

This makes good sense, but I've tried using a very simple script and
still get the following error:

  Microsoft VBScript runtime error '800a0046'

  Permission denied

  /test_for_domain_files/domain_file_handling.asp, line 8

This is the entire ASP code it runs:

<%

CopyAFile "\\lbdb601\c$\test1.txt", "\\lbdb601\c$\test2.txt"

Sub CopyAFile(vFrom, vTo)
  Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")
  fso.CopyFile vFrom, vTo, True
  Set fso = Nothing
End Sub

%>

The very same code runs fine from the Desktop in a .VBS file.

Should this be possible, and if so any ideas why I'm getting the
error.

TIA,

Colin



Relevant Pages

  • Re: Problem with ASP on Webserver
    ... There is no ActiveX object involved in this problem, we only request a ASP ... function in the script ... (Accept-Language:) ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Problem with ASP on Webserver
    ... There is no ActiveX object involved in this problem, we only request a ASP ... function in the script ... (Accept-Language:) ...
    (microsoft.public.windowsce.platbuilder)
  • HOWTO: Remotely debug classic ASP in Visual Studio 2005
    ... i am still no closer to being able to debug ... ASP not ASP.NET ... Connect to, or expand, the web-server running the web-site is you want ... Check the "Enable ASP server-side script debugging" checkbox. ...
    (microsoft.public.vsnet.debugging)
  • HOWTO: Remotely debug classic ASP in Visual Studio 2005
    ... i am still no closer to being able to debug ... ASP not ASP.NET ... Connect to, or expand, the web-server running the web-site is you want ... Check the "Enable ASP server-side script debugging" checkbox. ...
    (microsoft.public.vsnet.debugging)
  • Re: IIS Template Cache and Script Engine Cache
    ... Ok, I went and asked the ASP Dev about it, so I will share what I've ... The two concepts you are asking about is the "Template Cache" and "Script ... The "Template Cache" is a cache of the intermediate form of the particular ...
    (microsoft.public.inetserver.iis)