Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 22nd, 2003, 01:02 AM
Authorized User
 
Join Date: Jul 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default File System Object in Server Side

HI!

I have this function.. It always worked.. now it doesn't and I don't know why coz I don't think I changed anything in my server.. I already instaled WinXp Pro in a brand new PC and tested the site but the error still appears...

What happens is that I am trying to use ASP File System Object and if I try to use the method FileExists or any other ordinary method it woks fine.. But it I try to get the handle to a File or Folder with the GetFile or GetFolder methods the site getts lazzy and doesn't open! It never returns an error.. but stays there for a long time.. Until i give up! I don't think there's nothing wrong with the script.. It works fine in Client Side.. but in Server side.. maybe you can help me.. It halts in the GetFolder statement! Thx

function listfolders() {
    var styles = new Array();

<%
    Dim ObjFSO, StyleCounter
    Dim objFolder
    Set ObjFSO = Server.CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder(Server.MapPath("..\style\")) ''here!!
    StyleCounter = 0

    For Each objStyle in objFolder.SubFolders
        Response.write "(blablabla)"
        StyleCounter = StyleCounter + 1
    Next
%>
    return styles;
}

 
Old December 22nd, 2003, 06:39 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Are you running programs like Norton Antivirus or McAfee Antivirus?
If so, check the options dialog for a feature called Script Blocking or something similar. This option blocks .vbs scripts and the FileSystemObject. If this seems to be the problem, it's up to you wether you want to sacrifice some security for the features of the FSO.

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 22nd, 2003, 09:48 AM
Authorized User
 
Join Date: Jul 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default

AHAHAAH!!! thx man!!! I never figured out why it all stop working at the same time at all my 3 computers!! ahaahah now that you told me that I remember that I installed Norton at the same time in all the computers!!!

THX!! Will check it out!!






Similar Threads
Thread Thread Starter Forum Replies Last Post
File System Object question fogofogo Classic ASP Basics 1 December 8th, 2005 04:14 PM
File System Object kumar_rajeshk Pro VB 6 7 April 28th, 2004 01:35 AM
File System Object Permissions kilika Classic ASP Basics 2 August 6th, 2003 09:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.