|
 |
asp_web_howto thread: Trouble using Scripting.FileSystemObject
Message #1 by "Terje Dahl" <terjda@o...> on Sat, 7 Sep 2002 00:35:00
|
|
I have trouble using the FileSystemObject.
I have tried a lot of samplecodes just to se if it will work.
It worked a couple of times in the beginning, now I can't get it to work
anymore.
I have a XP professional OS and IIS 5
Any ideas what could be wrong ?
this simple code should just crate a folder.
The browser just won't stop, nothing is happening.
<%
Sub CreateFolder
Dim fso, fldr
Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.CreateFolder("E:\HTML\www\MyTest")
Response.Write "Created folder: " & fldr.Name
End Sub
CreateFolder
%>
All the oter samplecodes behave similar.
No error msg. just blank white page.
Can it have something with permission settings ?
Can anyone please help me..
I would greatly appreciate any feedback.
Terje Dahl
Message #2 by "Ken Schaefer" <ken@a...> on Sat, 7 Sep 2002 11:51:26 +1000
|
|
Do you have Norton Antivirus installed? if so, disable "Script Blocking" and
reboot.
"Script Blocking" blocks access to a number of methods of the FSO, since
these are used by various types of viruses...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Terje Dahl" <terjda@o...>
Subject: [asp_web_howto] Trouble using Scripting.FileSystemObject
: I have trouble using the FileSystemObject.
: I have tried a lot of samplecodes just to se if it will work.
: It worked a couple of times in the beginning, now I can't get it to work
: anymore.
: I have a XP professional OS and IIS 5
: Any ideas what could be wrong ?
:
: this simple code should just crate a folder.
: The browser just won't stop, nothing is happening.
:
: <%
: Sub CreateFolder
: Dim fso, fldr
: Set fso = CreateObject("Scripting.FileSystemObject")
: Set fldr = fso.CreateFolder("E:\HTML\www\MyTest")
: Response.Write "Created folder: " & fldr.Name
: End Sub
:
: CreateFolder
: %>
:
: All the oter samplecodes behave similar.
: No error msg. just blank white page.
: Can it have something with permission settings ?
: Can anyone please help me..
: I would greatly appreciate any feedback.
:
: Terje Dahl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by Vijay G <happygv@y...> on Sun, 8 Sep 2002 04:02:42 -0700 (PDT)
|
|
Hello Terje Dahl,
I tried the same code, and the response was immediate. Only error I saw is, if the foldername prior to the last foldername in the
path hierarchy deosnt exist it would result in error. Else it is working fine. I would suggest you to check the following
if
1) IIS works fine,
2) A simple ASP page is getting browsed. (just a <%response.write "TEST"%> will do)
3) Try enableing the debuging options in the Browser and see.
4) When tried to open http://localhost it should open up the http://localhost/localstart.asp on yor browser, which means the ASP
pages are working fine. The path of localstart.asp is c:/inetpub/wwwroot/localstart.asp
Let us know if it helps.
Cheers!!!
Vijay G
Terje Dahl wrote:
I have trouble using the FileSystemObject.
I have tried a lot of samplecodes just to se if it will work.
It worked a couple of times in the beginning, now I can't get it to work
anymore.
I have a XP professional OS and IIS 5
Any ideas what could be wrong ?
this simple code should just crate a folder.
The browser just won't stop, nothing is happening.
Sub CreateFolder
Dim fso, fldr
Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.CreateFolder("E:\HTML\www\MyTest")
Response.Write "Created folder: " & fldr.Name
End Sub
CreateFolder
%>
All the oter samplecodes behave similar.
No error msg. just blank white page.
Can it have something with permission settings ?
Can anyone please help me..
I would greatly appreciate any feedback.
Terje Dahl
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
Message #4 by "Terje Dahl" <terjda@o...> on Sun, 8 Sep 2002 17:00:10
|
|
Thanks a lot!
After turning off "Script Blocking" the asp code worked like it's supposed
to.
Thanks again!
Terje Dahl
> Do you have Norton Antivirus installed? if so, disable "Script Blocking"
and
reboot.
"Script Blocking" blocks access to a number of methods of the FSO, since
these are used by various types of viruses...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Terje Dahl" <terjda@o...>
Subject: [asp_web_howto] Trouble using Scripting.FileSystemObject
: I have trouble using the FileSystemObject.
: I have tried a lot of samplecodes just to se if it will work.
: It worked a couple of times in the beginning, now I can't get it to work
: anymore.
: I have a XP professional OS and IIS 5
: Any ideas what could be wrong ?
:
: this simple code should just crate a folder.
: The browser just won't stop, nothing is happening.
:
: <%
: Sub CreateFolder
: Dim fso, fldr
: Set fso = CreateObject("Scripting.FileSystemObject")
: Set fldr = fso.CreateFolder("E:\HTML\www\MyTest")
: Response.Write "Created folder: " & fldr.Name
: End Sub
:
: CreateFolder
: %>
:
: All the oter samplecodes behave similar.
: No error msg. just blank white page.
: Can it have something with permission settings ?
: Can anyone please help me..
: I would greatly appreciate any feedback.
:
: Terje Dahl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #5 by jeff.montgomery@m... on Thu, 12 Sep 2002 05:14:54
|
|
1. Make sure default error handling is on, so you are seeing any errors on
your page, i.e. type "on error goto 0" before your code.
2. I've had trouble with Norton Antivirus (NAV), too. We use Professional,
and it is constantly messing with any code that writes to disk, including
saving Excel workbooks to disk from ASP. This is the case regardless of
the NAV options I have selected. To get around this, try creating an
ActiveX DLL with a function that performs the same task. For example, the
FileSystemObject.Write method that fails when running from ASP may run
fine from inside a DLL.
3. Uninstall Norton Antivirus - not a great option. Simply turning off
script blocking is the first thing to try, as Ken S. mentioned, but I have
run into cases where only uninstalling it would remedy the problem. Even
with every option disabled, I still had the problem if it was installed.
Jeff Montgomery
jeff.montgomery@m...
> I have trouble using the FileSystemObject.
I> have tried a lot of samplecodes just to se if it will work.
I> t worked a couple of times in the beginning, now I can't get it to work
a> nymore.
I> have a XP professional OS and IIS 5
A> ny ideas what could be wrong ?
> this simple code should just crate a folder.
T> he browser just won't stop, nothing is happening.
> <%
S> ub CreateFolder
D> im fso, fldr
S> et fso = CreateObject("Scripting.FileSystemObject")
S> et fldr = fso.CreateFolder("E:\HTML\www\MyTest")
R> esponse.Write "Created folder: " & fldr.Name
E> nd Sub
> CreateFolder
%> >
> All the oter samplecodes behave similar.
N> o error msg. just blank white page.
C> an it have something with permission settings ?
C> an anyone please help me..
I> would greatly appreciate any feedback.
> Terje Dahl
|
|
 |