Re: FSO Object (Write Access Issues)

From: Brian (lord03000_at_hotmail.com)
Date: 07/28/04


Date: Tue, 27 Jul 2004 19:10:05 -0700

Thanks Ken for your input.

I'll look into this, but I do use the same computer for
this. Thus if NAV stopped it, I would see an dialogue.

>-----Original Message-----
>Check your Antivirus Software. Most AV software these
days includes features
>to prevent the FSO from writing files (because a lot of
viruses use the FSO
>to write stuff). You'll need to disable that feature.
What usually happens
>is that a dialogue box pops up asking if you want to
allow the FSO to write
>to the disk, however because the user account that is
running the webpage
>isn't the same as the one you're logged in as, you never
see the dialogue
>box, and the page appears to "hang" (it's waiting for
someone to click
>"OK").
>
>In Norton Antivirus, the feature is called "script
blocking"
>
>Cheers
>Ken
>
>"Brian" <lord03000@hotmail.com> wrote in message
>news:557001c4743d$58803200$a601280a@phx.gbl...
>> I have IIS 5.1 on Win XP Pro SP1. I'm trying to use
ASP's
>> FSO Object to write to a file, but it never works.
>> Everytime I open the page, it just sits there, I wait
and
>> wait, then it gives me an operation Timeout Message.
I've
>> checked over the settings in IIS over and over again to
>> make sure I have write access, but for some reason it
>> just doesn't work.
>>
>> Here is my ASP code
>> (C:\inetpub\wwwroot\lpctech\welcome.asp):
>> <%
>> 'START OF CODE
>> Dim objFSO
>> Dim strPath
>> Dim intCount
>>
>> strPath = Server.MapPath(strWritePath
& "\hitCount.txt")
>> Set objFSO = Server.CreateObject
>> ("Scripting.FileSystemObject")
>> Set objFile = objFSO.OpenTextFile(strPath, ForReading,
>> True, TristateFalse)
>> intCount = int(objFile.ReadLine)
>> objFile.Close
>> intCount = intCount + 1
>> Set objFile = objFSO.OpenTextFile(strPath, ForWriting,
>> True, TristateFalse)
>> objFile.Write intCount
>> objFile.Close
>> 'END OF CODE
>> %>
>>
>> Explaination: What I'm trying to do here is a simple
file
>> based hit counter.
>>
>> strWritePath is a string set in include.asp which is
>> included in the file.
>>
>> Here is what it is in there:
>> strWritePath = Server.MapPath(.\db)
>>
>> Which translates to:
>> C:\Inetpub\wwwroot\lpctech\db
>>
>> What the code does is open a file (hitcount.txt) which
>> just has a number. It reads that number, converts it
into
>> an interger, increments it, and writes it back into the
>> file.
>>
>> I've tested this script on my website (hosted by
someone
>> else) and it works without a problem. It has a problem
>> with my computer.
>>
>> If you have any idea what's wrong, please tell me.
>> email: lord03000@hotmail.com
>> Thanks in advance for any help.
>
>
>.
>



Relevant Pages

  • Re: Retrieve Document Properties in Word
    ... the dialogue box is replaced with a new form which doesn't have the ... manager field or the hyperlink base. ... Dim strFileName As String ... Dim fDialog As FileDialog ...
    (microsoft.public.word.docmanagement)
  • Re: FSO Object (Write Access Issues)
    ... you would not see a dialogue. ... Each user has their own security context, ... > days includes features ... > viruses use the FSO ...
    (microsoft.public.inetserver.iis.security)