473,624 Members | 2,534 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\wwwr oot\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 2148
On 31 Mar 2004 04:16:35 -0800, ro************* @trainingteam.c om
(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\wwwr oot\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 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!
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 '' axWindowsMediaPlayer.Ctlcontrols.play(); '' (= play) command from the FrmMain form to the Fullscreen form? Something like:
5
1240
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
10122
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 website, and one of the functions offer in this site is that the end user is able to print all files located in a specific folder, and the files were actually generated in the folder based on the end user selection. After printing, the files will be...
0
8168
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8614
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8471
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6107
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2603
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 we have to send another system
1
1780
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.