ASP Page Unable to create a Text File


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: ASP Page Unable to create a Text File

  1. #1
    syedkhan Guest

    ASP Page Unable to create a Text File


    Problem: ASP Page Unable to create a Text File
    Platform: Windows XP Professional, IIS 5.1, File SYstem NTFS

    The ASP page executes for ever in the browser (Internet Explorer 6.0),
    No error message is diosplayed, the text file is not created,
    Basically i am trying to create a Text File using the
    "Scripting.FileSystemObject" object. Please see the code below. THe directory
    where i am trying to write the file has permissions for
    Everyone(All Users) to write/modify.

    <%

    dim fld, fs, fobj, sid

    'Create file system object to work on the files
    Set fobj = server.CreateObject("Scripting.FileSystemObject")


    'Store the sessionID in a variable to create the dat file for each session
    (user).
    sid = session.SessionID

    path = Request.ServerVariables("appl_physical_path")

    'Create the dat file based on session id and store the full path of file
    to be created into a variable.
    ufile =path& sid& ".dat"


    set fs = fobj.CreateTextFile(ufile,true)

    %>

    Thanks.

    SK

  2. #2
    Kent Guest

    Re: ASP Page Unable to create a Text File

    This may be caused by your anti-virus (eg-Norton Script Blocking). Check out
    http://support.microsoft.com/default...;EN-US;q295375

    Kent

    "syedkhan" <syedkhan@ureach.com> wrote in message
    news:3d68ccb1$1@10.1.10.29...
    >
    > Problem: ASP Page Unable to create a Text File
    > Platform: Windows XP Professional, IIS 5.1, File SYstem NTFS
    >
    > The ASP page executes for ever in the browser (Internet Explorer 6.0),
    > No error message is diosplayed, the text file is not created,
    > Basically i am trying to create a Text File using the
    > "Scripting.FileSystemObject" object. Please see the code below. THe

    directory
    > where i am trying to write the file has permissions for
    > Everyone(All Users) to write/modify.
    >
    > <%
    >
    > dim fld, fs, fobj, sid
    >
    > 'Create file system object to work on the files
    > Set fobj = server.CreateObject("Scripting.FileSystemObject")
    >
    >
    > 'Store the sessionID in a variable to create the dat file for each session
    > (user).
    > sid = session.SessionID
    >
    > path = Request.ServerVariables("appl_physical_path")
    >
    > 'Create the dat file based on session id and store the full path of file
    > to be created into a variable.
    > ufile =path& sid& ".dat"
    >
    >
    > set fs = fobj.CreateTextFile(ufile,true)
    >
    > %>
    >
    > Thanks.
    >
    > SK




  3. #3
    Paul Clement Guest

    Re: ASP Page Unable to create a Text File

    On 25 Aug 2002 05:25:21 -0700, "syedkhan" <syedkhan@ureach.com> wrote:


    Problem: ASP Page Unable to create a Text File
    Platform: Windows XP Professional, IIS 5.1, File SYstem NTFS

    The ASP page executes for ever in the browser (Internet Explorer 6.0),
    No error message is diosplayed, the text file is not created,
    Basically i am trying to create a Text File using the
    "Scripting.FileSystemObject" object. Please see the code below. THe directory
    where i am trying to write the file has permissions for
    Everyone(All Users) to write/modify.

    <%

    dim fld, fs, fobj, sid

    'Create file system object to work on the files
    Set fobj = server.CreateObject("Scripting.FileSystemObject")


    'Store the sessionID in a variable to create the dat file for each session
    (user).
    sid = session.SessionID

    path = Request.ServerVariables("appl_physical_path")

    'Create the dat file based on session id and store the full path of file
    to be created into a variable.
    ufile =path& sid& ".dat"


    set fs = fobj.CreateTextFile(ufile,true)

    %>

    See the following MS KB article:

    PRB: Cannot Access Remote Files with the FileSystemObject
    http://support.microsoft.com/default...LNG=ENG&SA=PER


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center