473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use of FSObject

Thanks a lot for every suggestion.
I'm a roockies in asp page.
I'm trying to improve a internal counter. I'he found the code to
manage it (very simple) but have problems with autorization.

I give "IUSR_name" the autorization (read, write, change, ALL) on
specific directory (phisical c:\inetpub\wwwroot\counters) created to
manage the counter (just this directory) as described in manual and
reference. I did the same with "_web anonimous user" but the response
is always the same:
run-time error in Microsoft VBScript (0x800A0046)
Authorization denied.

Do you have some idea how to solve this problem.
Thanks a lot
Roberto
Jul 19 '05 #1
2 2142
On 31 Mar 2004 04:16:35 -0800, ro*************@trainingteam.com
(RobertoF) wrote:
Thanks a lot for every suggestion.
I'm a roockies in asp page.
I'm trying to improve a internal counter. I'he found the code to
manage it (very simple) but have problems with autorization.

I give "IUSR_name" the autorization (read, write, change, ALL) on
specific directory (phisical c:\inetpub\wwwroot\counters) created to
manage the counter (just this directory) as described in manual and
reference. I did the same with "_web anonimous user" but the response
is always the same:
run-time error in Microsoft VBScript (0x800A0046)
Authorization denied.

Do you have some idea how to solve this problem.


Post a code snippet, and the actual text of the error. As for your
error code, this is the normal issue:

http://www.aspfaq.com/show.asp?id=2090

Jeff
Jul 19 '05 #2
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 programmatically using the inherent VBScript function
CreateObject or the ASP Server object function Server.CreateObject with
one of the following class strings:
Scripting.FileSystemObject
Scripting.Dictionary
In addition, this file may attempt to create, access or delete other
files on the server programmatically 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.ServerVariables("URL")
Set FSObject = CreateObject("Scripting.FileSystemObject")
Set GetTotals =
FSObject.OpenTextFile("C:\Inetpub\wwwroot\counters \PageTotals.txt",1,0)
x=0
While Not GetTotals.AtEndOfStream
ReDim preserve PageName(x)
PageName(x) = GetTotals.ReadLine
If PageName(x) = ThisPage Then
ReDim preserve PageHits(x)
PageHits(x) = GetTotals.ReadLine + 1
DisplayCount = PageHits(x)
x = x + 1
Else
ReDim preserve PageHits(x)
PageHits(x) = GetTotals.ReadLine
x = x + 1
End If
Wend
GetTotals.Close
Set GetTotals = Nothing
Set WriteTotals =
FSObject.CreateTextFile("C:\Inetpub\wwwroot\counte rs\PageTotals.txt")
x = 0
For Each PageEntry In PageName
WriteTotals.WriteLine PageName(x)
WriteTotals.WriteLine PageHits(x)
x = x + 1
Next
WriteTotals.Close
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!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
432
by: sanderpleijers | last post by:
Hi, Im using 2 forms. The first form is called FrmMain. The second form has windows media player in it with controls. Its named: Fullscreen. Now, how can i send a ''...
5
1236
by: nimbalkar | last post by:
Is there a way to identify the list of software installed in a computer using vb code. kindly help. Thanks & Regds,
1
10108
by: gray d newbie | last post by:
Greetings All, I'm new to this forum as well as to ASP. Therefore I am ready to learn from the ASP experts in this forum. Thank you very much in advance. I was assign to develop a ASP based...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.