-
Asp
ASP Coding.
I want to create a file in the client using file system object. It works
when i tried it using Personal web server. But when i used it with
www.brinkster.com , some error occurs. It says internal server
error. Tried many times but cant find a solution. What could be the problem.
Please help me out guys.
-
Check and find out if Brinkster supports the use of .ASP files. It's possible that they don't, and if so, that could be causing your error. I know that not all hosting companies will support .ASP files.
-
I've got it working once using the example code provided by the brinkster site. It's located here: http://www.brinkster.com/CodeBank/ShowSnippet.aspx?n580
The code isn't that long so I might as well include it in the post:
Code:
<%
If session("hitcount") = "" Then '
Const ForReading = 1, ForWriting = 2, ForAppending = 8 '
Dim hitcount, fso, f, filen '
filen = Server.MapPath("/accountname/db/hitcount.txt") '
Set fso = CreateObject("Scripting.FileSystemObject") '
Set f = fso.OpenTextFile(filen, ForReading) '
If f.AtEndOfStream Then '
hitcount = "0" '
Else
hitcount = f.readall '
End if '
f.close '
'
If hitcount = "0" Then '
BTW, the example is a hit counter.
-
Maverick brinkster supports ASP. But i cant get this thing to work. going crazy. As i said
it works fine when i tried it with PWS. Hope someone will help me out.
-
"I want to create a file in the client " you say. But that is impossible.
The reason you got it to work on your PWS is just that your client
is also your server.