Click here to Skip to main content
16,011,447 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Form fields Pin
Sarvesvara (BVKS) Dasa26-May-03 6:03
Sarvesvara (BVKS) Dasa26-May-03 6:03 
QuestionDo you use Macromedia Dreamweaver MX to develop the web? Pin
Link260024-May-03 21:07
Link260024-May-03 21:07 
AnswerRe: Do you use Macromedia Dreamweaver MX to develop the web? Pin
theJazzyBrain25-May-03 0:11
theJazzyBrain25-May-03 0:11 
AnswerRe: Do you use Macromedia Dreamweaver MX to develop the web? Pin
John Kuhn27-May-03 9:08
John Kuhn27-May-03 9:08 
AnswerRe: Do you use Macromedia Dreamweaver MX to develop the web? Pin
Vasudevan Deepak Kumar28-May-03 0:28
Vasudevan Deepak Kumar28-May-03 0:28 
AnswerRe: Do you use Macromedia Dreamweaver MX to develop the web? Pin
David Wulff2-Jun-03 4:01
David Wulff2-Jun-03 4:01 
AnswerRe: Do you use Macromedia Dreamweaver MX to develop the web? Pin
Daniel Burnham5-Jun-03 5:20
sussDaniel Burnham5-Jun-03 5:20 
GeneralIIS Hanging when opening text file Pin
Touson22-May-03 22:49
Touson22-May-03 22:49 
Hi,

I have a web site, written in ASP, where a page needs to be updated regularly by a non-technical person. I want to end up with a system whereby the user will complete the information in a text file and upload it to the web server, where the ASP file reads it and outputs the information.

After reading various tutorials on doing this I can see that the process and scripting is quite basic. I have tried using the following script created by Chris Maunder on this site:-

<% Option Explicit

Const Filename = "/readme.txt" ' file to read

Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0

' Create a filesystem object
Dim FSO
set FSO = server.createObject("Scripting.FileSystemObject")

' Map the logical path to the physical system path
Dim Filepath
Filepath = Server.MapPath(Filename)

if FSO.FileExists(Filepath) Then

' Get a handle to the file
Dim file
set file = FSO.GetFile(Filepath)

' Get some info about the file
Dim FileSize
FileSize = file.Size

Response.Write "File: " & Filename & " (size " & FileSize &_
" bytes)"


' Open the file
Dim TextStream
Set TextStream = file.OpenAsTextStream(ForReading, _
TristateUseDefault)

' Read the file line by line
Do While Not TextStream.AtEndOfStream
Dim Line
Line = TextStream.readline

' Do something with "Line"
Line = Line & vbCRLF

Response.write Line
Loop




Set TextStream = nothing

Else

Response.Write "File " & Filename &_
" does not exist"

End If

Set FSO = nothing
%>

As far as I can tell, this script should work. However, when I try to open the ASP document (hosted on IIS on my laptop, which is running Win XP Professional), the browser just hangs ? The status bar message say's it is opening test.asp, but it just sit's there and nothing happens ?

I have tested other ASP files on my version of IIS to ensure ASP is installed and working, and every file that doesn't try to access a text file works fine. I have also tested various aspects of the FileSystemObject to make sure it wasn't that, FileExists, FolderExists, GetFolder all work fine so it can't be the FileSystemObject. The only thing I can think of it being is the file permissions in IIS, but I have tried changing them but that doesn't seem to help either, am I doing it right ?

Any help you can give on this situation would be greatly appreciated.

Thanks in advance

Chris

"Inside, alway's tryin to get back inside" ~ Lane Staley
GeneralRe: IIS Hanging when opening text file Pin
Roger Wright23-May-03 4:11
professionalRoger Wright23-May-03 4:11 
GeneralRe: IIS Hanging when opening text file Pin
Sarvesvara (BVKS) Dasa24-May-03 22:48
Sarvesvara (BVKS) Dasa24-May-03 22:48 
GeneralRe: IIS Hanging when opening text file Pin
Daron Tan28-May-03 4:20
Daron Tan28-May-03 4:20 
GeneralTriggering vbcode in assess from a server side asp code Pin
iluha22-May-03 4:57
iluha22-May-03 4:57 
GeneralRe: Triggering vbcode in assess from a server side asp code Pin
Roger Wright22-May-03 6:49
professionalRoger Wright22-May-03 6:49 
GeneralDownload time Pin
Brakanjan21-May-03 22:53
Brakanjan21-May-03 22:53 
GeneralRe: Download time Pin
Brian Delahunty22-May-03 9:40
Brian Delahunty22-May-03 9:40 
GeneralRe: Download time Pin
The Limey23-May-03 8:05
The Limey23-May-03 8:05 
Questionkilling child windows...how? Pin
Atilla Selem21-May-03 22:26
Atilla Selem21-May-03 22:26 
GeneralUpload File without refreshing actual pg Pin
Anonymous21-May-03 21:28
Anonymous21-May-03 21:28 
GeneralRe: Upload File without refreshing actual pg Pin
The Limey23-May-03 8:19
The Limey23-May-03 8:19 
GeneralRe: Upload File without refreshing actual pg Pin
Anonymous27-May-03 0:05
Anonymous27-May-03 0:05 
Generalcomments used in perl CGI Pin
K. Shaffer21-May-03 9:59
K. Shaffer21-May-03 9:59 
GeneralRe: comments used in perl CGI Pin
markkuk21-May-03 11:04
markkuk21-May-03 11:04 
GeneralFlash 5 Pin
ballyduff20-May-03 23:19
ballyduff20-May-03 23:19 
GeneralRe: Flash 5 Pin
ColinDavies20-May-03 23:26
ColinDavies20-May-03 23:26 
GeneralRe: Flash 5 Pin
DFU2322-May-03 8:10
DFU2322-May-03 8:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.