Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components 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 October 14th, 2003, 08:30 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default IIS Problem

hi all,
i am 2 month later studying ASP and the problem is when i use the file object "CreateObject("Scripting.FileSystemObject")" the webpage remain much time without opening, it also affect the iis and no other page is opened and return Error "many users using the web site"

this is part of the script i use
<%

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\testfile.txt", True)
MyFile.WriteLine("This is a test.")
MyFile.Close
%>


there is a question
is this file object need to be installed!!


need help




Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer
 
Old October 15th, 2003, 04:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I once did something like this when I had to do a style sheet on-the-fly so to speak...
Code:
<%
Sub CreateAFile(fn)

   Dim fso, MyFile
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set MyFile = fso.CreateTextFile(Server.Mappath(fn), True)
   MyFile.Close

End Sub

Sub makeStyleSheet(nameCSS)

   Dim filename
   filename = nameCSS

   CreateAFile(filename)

   Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile(Server.Mappath(filename), 2)

   f.WriteLine "A { color:#C0C0C0; }"
   f.WriteLine "A:link { text-decoration: none; }"
   f.WriteLine "A:active { text-decoration: none; }"
   f.WriteLine "A:visited { text-decoration: none; }"

   f.Close

End Sub
%>
It can probably help you! I didn't install anything.

Where in Egypt are you from I have just been to Cairo and Hurghada, nice... :)

Hope it helps

Jacob.

 
Old October 15th, 2003, 04:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hmmm, this sounds like a good old Antivirus problem again.....

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.

Once you disable this feature, you can create objects of type Scripting.FileSystemObject. The FSO is installed on recent Windows installations by default.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old October 15th, 2003, 07:48 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

thanks for all,

it was right Antivirus who blocks the script from running




Ahmed Ali
Software Developer
 
Old February 4th, 2006, 12:24 PM
Registered User
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx Imar... that tip about the AV help me a lot.
:D

"Programing adicted here... like the challenge of complex codes... Returne to the source ;)"





Similar Threads
Thread Thread Starter Forum Replies Last Post
IIS problem dinesherandika ASP.NET 1.0 and 1.1 Basics 6 March 12th, 2007 11:43 PM
IIS Problem? hosefo81 Classic ASP Components 11 May 3rd, 2004 08:07 AM
IIS problem Violaplayer Classic ASP Basics 0 December 24th, 2003 03:25 PM





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