Error
===> in this line "Set WriteTotals = ...."
Error Details:
Error Type: Microsoft VBScript runtime
Associated Error Number: 800A0046
Cause/Symptoms:
A quick scan of the failing ASP file's contents reveals an object being
creating programmaticall y using the inherent VBScript function
CreateObject or the ASP Server object function Server.CreateOb ject with
one of the following class strings:
Scripting.FileS ystemObject
Scripting.Dicti onary
In addition, this file may attempt to create, access or delete other
files on the server programmaticall y using an object reference created
from the first class string mentioned above.
Code used
============
<%
Dim x
Dim FSObject
Dim GetTotals
Dim WriteTotals
Dim PageEntry
Dim PageHits()
Dim PageName()
Dim ThisPage
'What page are we on?
ThisPage = Request.ServerV ariables("URL")
Set FSObject = CreateObject("S cripting.FileSy stemObject")
Set GetTotals =
FSObject.OpenTe xtFile("C:\Inet pub\wwwroot\cou nters\PageTotal s.txt",1,0)
x=0
While Not GetTotals.AtEnd OfStream
ReDim preserve PageName(x)
PageName(x) = GetTotals.ReadL ine
If PageName(x) = ThisPage Then
ReDim preserve PageHits(x)
PageHits(x) = GetTotals.ReadL ine + 1
DisplayCount = PageHits(x)
x = x + 1
Else
ReDim preserve PageHits(x)
PageHits(x) = GetTotals.ReadL ine
x = x + 1
End If
Wend
GetTotals.Close
Set GetTotals = Nothing
Set WriteTotals =
FSObject.Create TextFile("C:\In etpub\wwwroot\c ounters\PageTot als.txt")
x = 0
For Each PageEntry In PageName
WriteTotals.Wri teLine PageName(x)
WriteTotals.Wri teLine PageHits(x)
x = x + 1
Next
WriteTotals.Clo se
Set WriteTotals = Nothing
Set FSObject = Nothing
Response.Write( "<font size=2><b>You are " & ThisPage & _
" Page visitor number...</b></font><br>" & _
DisplayCount & "</font>")
%>
============
For other info contact me .
Thanks
RobertoF
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!