George
Sun Feb 22 14:24:00 CST 2004
No no like this:
<%@language=3D"VBScript"%>
<%
Dim TestFile, TFileStream
Set TestFile=3DServer.CreateObject("Scripting.FileSystemObject")
Set =
TFileStream=3DTestFile.CreateTextFile("c:\inetpub\wwwroot\ABG_ASP\TestFil=
e.txt")
%>
<html>
<title>Working with the File Object</title>
<body>
<b>Working with the File object!</b>
<hr>
<%
TFileStream.WriteLine "File Object in ASP!"
TFileStream.Close
%>
</body>
</html>
You must have NTFS write permissions in ABG_ASP
There you go I just tested it. Remember you must give Everyone =
(IIS_MachineName) Write access in the folder using NTFS. I also give =
Network the same permissions in this folder.
--=20
George Hester
__________________________________
"Ciberguy" <slipnot@rogers.com> wrote in message =
news:OXijxtV#DHA.1672@TK2MSFTNGP12.phx.gbl...
>=20
> "George Hester" <hesterloli@hotmail.com> wrote in message
> news:ug9REnR%23DHA.1936@TK2MSFTNGP12.phx.gbl...
> Try putting this ASP at the root (in wwwroot) and call it hello.asp
>=20
> <%@language=3D"VBScript"%>
> <%=3D"Hello"%>
>=20
> Access by
http://localhost/hello.asp
>=20
> what happens?
>=20
> Thank you George for replying!
>=20
> When I use the script above the browser returns with "hello". By the =
way I
> am using PWS IIS 5.0 W2K SP4...
>=20
> OK
>=20
> If I execute an easy script like this:
> <html>
> <body>
> <p>
> <b>This is my first ASP page!</b>
> </p>
> Today's date is <%=3DDate()%>
> </body>
> </html>
>=20
> Displayed on my browser window is the DATE. No problem with that =
script.
> BUT if I attempt to run a script like this:
>=20
> <html>
> <title>Working with the File Object</title>
> <body>
> <b>Working with the File object!</b>
> <hr>
> <%
> set TestFile=3DServer.CreateObject("Scripting.FileSystemObject")
> set
> =
TFileStream=3DTestFile.CreateTextFile("c:\inetpub\wwwroot\ABG_ASP\TestFil=
e.txt
> ")
> TFileStream.WriteLine "File Object in ASP!"
> TFileStream.Close
> %>
> </body>
> </html>
>=20
> I receive nothing on the screen. The file is not created. The location =
were
> the file "TestFile.txt" is to be created does exist and the path is =
correct.
> I have checked this many times.
>=20
> PWS is working, The problem is that I can run scripts that work only =
if I am
> not attempting to open a file insert a line of text and close the =
file.
> Strange!
>=20
> The top script works when I use
http://myPCname/ABG_ASP/TestPage.asp =
or
>
http://localhost/TestPage.asp
> The second script does not work when I use
>
http://myPCname/ABG_ASP/FirstPage.asp or =
http://localhost/FirstPage.asp
>=20
>