Filesystem Object 
Author Message
 Filesystem Object

ASP Development Question

Hi

I am trying to use the FileSystemObject to automate a replication process
between dev and live servers.  I can check to see if the file exists on the
live and dev boxes but as soon as I attempt to copy the file I get

No error '8007052e' Logon failure : unknown user name or bad password

I image this has to do with permissions on the live box - which account
should I change?  I am currently logged on via a browser as an administrator
so I have the rights, but it appears when the server serves the ASP page the
same rights are no longer there and the copy operation fails.

 I hope I have made the point I want to get across.  I have pasted the ASP
file below for completeness.

Thanks afor any help I get!

Regards

Malc

ASP Source :


<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>

<%
Set fso = CreateObject("Scripting.FileSystemObject")

DevDriveName = "E:" 'local drive on server
LiveDriveName = "H:" 'mapped on server using admin account
LocalPath  = "WEBS" 'common on both
DevSiteName  = "SITEDEV"
LiveSiteName = "SITELIVE"
FileName  = "MYPAGE.HTM"

Response.Write "DevDriveName : "&DevDriveName&"<BR>"
Response.Write "LiveDriveName : "&LiveDriveName&"<BR>"
Response.Write "Directory  : "&LocalPath&"<BR>"
Response.Write "DevSiteName  : "&DevSiteName&"<BR>"
Response.Write "LiveSiteName : "&LiveSiteName&"<BR>"
Response.Write "FileName  : "&FileName&"<BR>"

DevFile  = DevDriveName&"\"&LocalPath&"\"&DevSiteName&"\"&FileName

LiveFile = LiveDriveName&"\"&LocalPath&"\"&LiveSiteName&"\"&FileName

Response.Write "Dev - Whole Thing  : "&DevFile&"<BR>"
Response.Write "Live- Whole Thing  : "&LiveFile&"<BR>"

'Does file exist on Dev
Response.Write ("<br><BR>Checking file on Dev : ")

if (fso.FileExists(DevFile)) then
 Response.Write ("Yes")
else
 Response.Write("No")
end if

Response.Write ("<br><BR>Checking file on Live : ")

if (fso.FileExists(LiveFile)) then
 Response.Write ("Yes")
else
 Response.Write("No")
end if

'Trying to copy file
fso.CopyFile DevFile , LiveFile , true
'At this point I get the failure

'Does file exist on Dev
Response.Write ("<br><BR>Checking file on Dev : ")

if (fso.FileExists(DevFile)) then
 Response.Write ("Yes")
else
 Response.Write("No")
end if

Response.Write ("<br><BR>Checking file on Live : ")

if (fso.FileExists(LiveFile)) then
 Response.Write ("Yes")
else
 Response.Write("No")
end if

%>
</BODY>
</HTML>



Sun, 25 Nov 2001 03:00:00 GMT  
 Filesystem Object

Quote:
>I image this has to do with permissions on the live box - which account
>should I change?  I am currently logged on via a browser as an
administrator
>so I have the rights, but it appears when the server serves the ASP page
the
>same rights are no longer there and the copy operation fails.

It could be something to do with the permissions of the IIS process. I
believe that when you connect to the server to allow the html session etc it
is a virtual logon as the IIS user, on the development machine I am working
on this user is the lowest of the low and can't actually access some parts
of the file system.

Michael Jervis




Sun, 25 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. performance of FileSystem-object

2. FSO (FileSystem object)

3. FileSystem Object Read Order

4. filesystem object

5. Problem with filesystem object

6. Filesystem Object

7. Filesystem object UNC Path Error

8. Problems with Filesystem object Copy method

9. FileSystem Object

10. Filesystem object

11. GetFolder method for FileSystem Object not working on Win2000

12. FileSystem Object Network Path Error

 

 
Powered by phpBB® Forum Software