|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All,
In my serverside script I have gone down to the bare bones and the following doesn't seem to work: dim fs dim fst dim LineOut set fs = Server.CreateObject"Scripting.FileSystemObject") set fst = fs.CreateTextFile("C:\TEMP\home.tmp",True) lineout = "MAFFIdentifier" & vbtab & "Title" & vbtab & "Initials" fst.writeline(lineout) lineout = " ================================================== ========" fst.writeline(LineOut) fst.close set fs = nothing The server gets to the end since I place a response.write in to test. If I cut and past this into VB declare the variables as objects and lineout as string and remove the "Server." from the line when setting fs, then it works fine in VB. Thanks Bill |
|
#2
|
|||
|
|||
|
Hi
Do you have any on error resume next statements in your asp code The one thing that I noticed was that you were missing a bracket from the server.createobject line of code, but I assume that this was a typo The following code worked on mine <% dim fs dim fst dim LineOut set fs = Server.CreateObject("Scripting.FileSystemObject") set fst = fs.CreateTextFile("C:\TEMP\home.txt",True) lineout = "MAFFIdentifier" & vbtab & "Title" & vbtab & "Initials" fst.writeline(lineout) lineout = "==========================================================" fst.writeline(LineOut) fst.close set fs = nothing %> The only thing that I had a problem with initially was the permissions on the TEMP directory, so make sure that the IUSR account has the relevant permissions. I hope this helps Darrell |
|
#3
|
|||
|
|||
|
Hi Darrell,
Yes the Bracket was a typo, I have it in my code. I havn't tested the IUSR permissions, how do I do that? Thanks Bill |
|
#4
|
|||
|
|||
|
Basically right-click on the folder in windows explorer, and select properties. Then, click on the security tab. This will give you a box with a list of users that have access to the directory. I think that the c:\temp directory only has the administrators group as having full control, which means that the IUSR account will not have access. (however I could be wrong). If you only have the administrators in this box, then click on the add button, and you should be able to add the relevant users to the permissions
Let me know if you need any more help Darrell |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > FSO Not Working |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|