Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 14th, 2003, 08:30 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
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
  #2 (permalink)  
Old October 15th, 2003, 04:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
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.

  #3 (permalink)  
Old October 15th, 2003, 04:20 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 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.
  #4 (permalink)  
Old October 15th, 2003, 07:48 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
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
  #5 (permalink)  
Old February 4th, 2006, 12:24 PM
Registered User
 
Join Date: Feb 2006
Location: natal, rn, Brazil.
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 ;)"
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.