FSO and Windows 2003 Server
I just upgraded to a Windows 2003 server. I use the code below to write to a text file and create a counter for my web page. Each hit adds a digit to a number in a text file. This no longer works after moving to the 2003 server. The IUSR<machinename> account has permissions for the file and even for the wwwroot directory. Help!
Code:
<%
fp = Server.MapPath("aspcount.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(fp)
ct = Clng(a.ReadLine)
if Session("ct") = "" then
Session("ct") = ct
ct = ct + 1
a.close
Set a = fs.CreateTextFile(fp, True)
a.WriteLine(ct)
end if
a.Close
Response.Write ct
%>
:shock:
|