If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Create file - problems with

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-20-04, 01:52
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
Unhappy Create file - problems with

people, why i cant create the file,


set fs=Server.CreateObject("Scripting.FileSystemObject ")
set f=fs.CreateTextFile("c:\test.txt",true)

i use this lines, when i open asp file, i got error - 500
security on c disk = everyone.
Reply With Quote
  #2 (permalink)  
Old 07-20-04, 19:04
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Kinda guessing here because there is not much information to work with but... your running these commands under the permissions of the IIS User account (normally IUSER or whatever).

This user is unlikely to have access the the root of the hard drive....

Try creating the file in the wwwroot or where ever the website is stored and see if that changes things.
Reply With Quote
  #3 (permalink)  
Old 07-21-04, 03:03
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
people, i still have problems with creating file

<%
set fs=server.createobject("scripting.filesystemobject ")

set ofile=fs.CreateTextFile("C:\Inetpub\wwwroot\ASPtes t.txt")
ofile.close


set ofile=nothing
set fs=nothing
%>

here is my code, why this dont want to work ?

thanks for helping
Reply With Quote
  #4 (permalink)  
Old 07-21-04, 14:37
DMWCincy DMWCincy is offline
Registered User
 
Join Date: May 2004
Posts: 125
Most likely the IIS User only has read permision for that folder. Make sure the admin gives read/write permission for the folder you are trying to write to.
Reply With Quote
  #5 (permalink)  
Old 07-21-04, 19:24
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Are you getting any error message returned??
Reply With Quote
  #6 (permalink)  
Old 07-22-04, 04:18
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
:(

ON FOLDERS permissions are for admin, user, = all permissions
in IIS on folder is set read, write


but i still get 500 error


set fs=server.createobject("scripting.filesystemobject ")

set tfile=fs.CreateTextFile("C:\Inetpub\wwwroot\Marek\ OBJECT - FileSystemObject\somefile.txt")
tfile.WriteLine("Hello World!")
tfile.close
set tfile=nothing
set fs=nothing
Reply With Quote
  #7 (permalink)  
Old 07-22-04, 10:11
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Check the security on the folder and make sure that the permissions of Read & Execute, List Folder Contents and Read are checked for everyone on WIN 2000 or users on Win XP
Reply With Quote
  #8 (permalink)  
Old 07-24-04, 02:47
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
Problem Was In Norton Antivirus !!!

people script is workable nad permissionas was set noormally,
but when i disable script blocking in norton antivirus, then script works normaly, now when script blocking in norton antivirus is off, then i can create files....
Reply With Quote
Reply

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On