Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic 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 November 19th, 2003, 03:34 PM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Delete script doesnt execute

Hello everyone,
I guess this one is tricky and I know I won't get an answer unless someone had the same exact problem. I'm trying to execute a delete script via ASP, using the FileSystemObject, but it never executes.The Explorer progress bar stucks almost in the middle and thats it. The FileExists method works but Open, Delete, Copy and some more i guess, do not work. The funny thing is that this happens at home!!At work, the exact same script works!!!The code is simple and listed below

Code:
<%@Language=VBScript %>

<%
Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(Server.MapPath("testing.txt")) Then
    objFSO.DeleteFile(Server.MapPath("testing.txt"))
        Response.Write "FileFound!"
Else
Response.Write "Wrong Path" 
End If
Set objFSO=Nothing
%>
Thanks in advance for any possible answers
Kostas Lagos

 
Old November 19th, 2003, 07:41 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Do you have Norton Anti-Virus / Internet Security or a similar product installed at home? These products have a Script Blocking feature that prevents the FSO from running correctly. You may need to disable it (if you prefer the FSO over more security) to get it to work.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old November 20th, 2003, 03:13 AM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,
In fact I have Norton Antivirus 2004, but I havent check if there is such a feature..I'll take a look when i get back home
Thank you and sorry for the cross posting :)

Kostas Lagos

 
Old November 21st, 2003, 08:15 AM
Authorized User
 
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its OK now, script blocking was enabled
Thanks Imar

Kostas Lagos






Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete sheet IF sheetname doesnt contain string crmpicco Excel VBA 3 May 11th, 2005 05:34 AM
Delete Topic doesnt work mehdi62b Forum and Wrox.com Feedback 4 October 4th, 2004 02:02 PM
Webuivalidation script doesnt work in netscape olambe BOOK: ASP.NET Website Programming Problem-Design-Solution 2 July 29th, 2004 07:30 AM
Delete script doesnt execute kosla78 Classic ASP Basics 1 November 19th, 2003 07:44 PM
"Delete Events" in Form Do Not Execute tcarnahan Access VBA 3 November 12th, 2003 10:06 PM





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