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>