CreateTextFile deny on IIS

  • Thread starter Séverine Donnay
  • Start date
S

Séverine Donnay

Hi,

I develop a website on my local computer in ASP/SQL SERVER 2000 in XP PRO
OS. The CreateTextFile, DeleteFile and OpenTextFile (for appending and also
just for reading) functions doesn't work. I had done all security rights
from IIS (read, write, execute) and I shared the folder with all rights in
reading, writing and executing. I don't understand why this functions
doesn't work. I have no error display but the script never stop.
Do you have any idea ?
Thanks.
SD
 
S

Séverine Donnay

oups, sorry, this is my code :

Set MyFSO = CreateObject("Scripting.FileSystemObject")
Set MyXLFile = MyFSO.CreateTextFile(MyFilePath)
 
S

Séverine Donnay

It doesn't work.
In fact this line " if MyFSO.FileExists(MyFilePath) = True Then " works
But not this one " Set MyXLFile = MyFSO.CreateTextFile(MyFilePath) "
 
S

Séverine Donnay

MyFilePath = Server.MapPath("./csv/smart_myfile.csv")

Dim xlStr
Dim MyFSO

Set MyFSO = CreateObject("Scripting.FileSystemObject")

if MyFSO.FileExists(MyFilePath) = True Then
Set fileObject = MyFSO.GetFile(MyFilePath)
fileObject.Delete
Set fileObject = Nothing
end if

Dim MyXLFile
Set MyXLFile = MyFSO.CreateTextFile(MyFilePath)
MyXLFile.WriteLine "test"
MyXLFile.Close
Set MyXLFile = Nothing
 
S

Séverine Donnay

That is the problem. If it works on your server, why is it not works on mine
? I put all writing/reading/executing rights on IIS.
 
S

Steven Burn

Normally I'd have been inclined to blame a permissions issue, but as you've
already checked those, I'm afraid I've no idea.

Do you get _any_ error messages at all?. If not, try making sure debugging
is enabled;

In the IIS manager;

Right click your website and select "Properties", then click the Home
Directory tab.

Next click the Configuration button, followed by the Debugging tab, and make
sure both of the boxes are ticked (and additionally make sure the option to
send detailed error messages is selected).

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
R

Richard Gutery

I would give the Local Users group RWED. I did that on my server and
magically all worked. If IUSR_machine account has RWXD and you dont specify
the local USERSs group, then IUSR will be restricted to the permissions
inherited by the parent directory.

At least, that's what I had to do.

Hope it helps.

RG
 
B

Bob Lehmann

? I put all writing/reading/executing rights on IIS.
What account are you giving the permissions to - IUSR_machineName ?

Bob Lehmann
 
S

Séverine Donnay

I found the solution it comes from Norton : I need to disabled script
blocking in Norton Antivirus. Now it works !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top