Set fs = CreateObject("Scripting.FileSystemObject")-error 
Author Message
 Set fs = CreateObject("Scripting.FileSystemObject")-error

I'm not very experienced in VBScript yet, and I hope someone will be
able to help me with this problem:

I have the following VBScript in my page:
<script language="VBScript">
sub Submit_OnClick
  Const ForReading = 1, ForWriting = 2, ForAppending = 3
  Dim fs, f
  Set fs = CreateObject("Scripting.FileSystemObject")
  Set f = fs.OpenTextFile("testfile.txt", ForAppending,TristateFalse)
  f.Write "Hello world!"
  f.Close
end sub
</script>

When I'm clicking on the submit-button, the following error occurs:
Microsoft VBScript runtime error
[Line: 26] ActiveX component can't create object

The following line is Line 26:
  Set fs = CreateObject("Scripting.FileSystemObject")

I hope someone will be able to help.
Thanks in advance.

  vcard.vcf
< 1K Download


Thu, 01 Jun 2000 03:00:00 GMT  
 Set fs = CreateObject("Scripting.FileSystemObject")-error

You cannot create the FileSystemObject on the client side. It is too
great of a security breach to allow pages to freely write to the
hard-disk. It is available only on the server side.
Also, I thougth ForAppending was equal to 8...
-Heidi

Quote:

>I have the following VBScript in my page:
><script language="VBScript">
>sub Submit_OnClick
>  Const ForReading = 1, ForWriting = 2, ForAppending = 3
>  Dim fs, f
>  Set fs = CreateObject("Scripting.FileSystemObject")
>  Set f = fs.OpenTextFile("testfile.txt", ForAppending,TristateFalse)
>  f.Write "Hello world!"
>  f.Close
>end sub
></script>

>When I'm clicking on the submit-button, the following error occurs:
>Microsoft VBScript runtime error
>[Line: 26] ActiveX component can't create object

>The following line is Line 26:
>  Set fs = CreateObject("Scripting.FileSystemObject")



Fri, 02 Jun 2000 03:00:00 GMT  
 Set fs = CreateObject("Scripting.FileSystemObject")-error

Quote:

>You cannot create the FileSystemObject on the client side. It is too
>great of a security breach to allow pages to freely write to the
>hard-disk. It is available only on the server side.
>Also, I thougth ForAppending was equal to 8...
>-Heidi


>>I have the following VBScript in my page:

>>       [Using the FileSystemObject on the client side]

Use MS Internet Explorer "4.01"!!!
You can create the FileSystemObject on the client side with MSIE "4.01".
Go to View/Internet Options Menu.
Choose "Security" Tab and "Medium Security Level"

You have to remember: it's "a security breach to allow pages to freely write
to the hard-disk".

----
Marcelo Collao Huper | Miraflores 388, Santiago de Chile.

TEL: (56 2) 6869 135 | intranet: http://collao.holding.cl
FAX: (56 2) 6869 126 | internet: http://www.dcc.uchile.cl/~mcollao



Fri, 02 Jun 2000 03:00:00 GMT  
 Set fs = CreateObject("Scripting.FileSystemObject")-error

Quote:


> >You cannot create the FileSystemObject on the client side. It is too
> >great of a security breach to allow pages to freely write to the
> >hard-disk. It is available only on the server side.
> >Also, I thougth ForAppending was equal to 8...
> >-Heidi


> >>I have the following VBScript in my page:

> >>       [Using the FileSystemObject on the client side]

> Use MS Internet Explorer "4.01"!!!
> You can create the FileSystemObject on the client side with MSIE
> "4.01".
> Go to View/Internet Options Menu.
> Choose "Security" Tab and "Medium Security Level"

> You have to remember: it's "a security breach to allow pages to freely
> write
> to the hard-disk".

> ----
> Marcelo Collao Huper | Miraflores 388, Santiago de Chile.

> TEL: (56 2) 6869 135 | intranet: http://collao.holding.cl
> FAX: (56 2) 6869 126 | internet: http://www.dcc.uchile.cl/~mcollao

   How do you create a guestbook then?

  vcard.vcf
< 1K Download


Sat, 03 Jun 2000 03:00:00 GMT  
 Set fs = CreateObject("Scripting.FileSystemObject")-error

You would write code on the server side.  Server side scripting can access
the server's hard disk.

Eric

Quote:



>> >You cannot create the FileSystemObject on the client side. It is too
>> >great of a security breach to allow pages to freely write to the
>> >hard-disk. It is available only on the server side.
>> >Also, I thougth ForAppending was equal to 8...
>> >-Heidi


>> >>I have the following VBScript in my page:

>> >>       [Using the FileSystemObject on the client side]

>> Use MS Internet Explorer "4.01"!!!
>> You can create the FileSystemObject on the client side with MSIE
>> "4.01".
>> Go to View/Internet Options Menu.
>> Choose "Security" Tab and "Medium Security Level"

>> You have to remember: it's "a security breach to allow pages to freely
>> write
>> to the hard-disk".

>> ----
>> Marcelo Collao Huper | Miraflores 388, Santiago de Chile.

>> TEL: (56 2) 6869 135 | intranet: http://collao.holding.cl
>> FAX: (56 2) 6869 126 | internet: http://www.dcc.uchile.cl/~mcollao

>   How do you create a guestbook then?



Sat, 03 Jun 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Set filesys = CreateObject("Scripting.FileSystemObject")

2. Set fso = Server.CreateObject("Scripting.FileSystemObject")

3. Set filesys = CreateObject("Scripting.FileSystemObject")

4. CreateObject("Scripting.FileSystemObject") Error

5. CreateObject("Scripting.FileSystemObject") Error

6. CreateObject("Scripting.FileSystemObject") doesnt work

7. CreateObject("Scripting.FileSystemObject")

8. Problem: CreateObject ("scripting.FileSystemObject") under WSH

9. Problem with CreateObject("Scripting.FileSystemObject")

10. Problem: CreateObject ("scripting.FileSystemObject") under WSH

11. CreateObject("Scripting.FileSystemObject") not working

12. Server.CreateObject("Scripting.FileSystemObject")

 

 
Powered by phpBB® Forum Software