Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Scripting.FileSystemObject problems

Reply
Thread Tools

Scripting.FileSystemObject problems

 
 
PB4FUN
Guest
Posts: n/a
 
      09-20-2003
If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objTextStream
const strFileName = "F:\FileShare\resume.txt"
const fsoForReading = 1
If objFSO.FileExists("F:\FileShare\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFileName, fsoForReading)
#2
Response.Write "" & objTextStream.ReadAll & ""
#3
objTextStream.Close
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP


 
Reply With Quote
 
 
 
 
Aaron Bertrand [MVP]
Guest
Posts: n/a
 
      09-20-2003
Use something less intrusive than Norton.
http://www.aspfaq.com/2180





"PB4FUN" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> If I comment #2 to #5 no problems.
> If I uncomment #2, #4 and #5 the page hangs.
> Even did not reach the point to uncomment #3
> So, whats wrong. Do i have to alter some serversettings, and if so, what
> should be changed ?
>
> OS : W2KP/IIS
> CPU PII 350 MHz
> Mem >500 MB
>
> <%
> Dim objFSO
> Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
> Dim objTextStream
> const strFileName = "F:\FileShare\resume.txt"
> const fsoForReading = 1
> If objFSO.FileExists("F:\FileShare\resume.txt") then
> #1
> 'The file exists, so open it and output its contents
> Set objTextStream = objFSO.OpenTextFile(strFileName,

fsoForReading)
> #2
> Response.Write "" & objTextStream.ReadAll & ""
> #3
> objTextStream.Close
> #4
> Set objTextStream = Nothing
> #5
> Response.Write strFileName & " was found."
> Else
> 'The file did not exist
> Response.Write strFileName & " was not found."
> End If
>
> Set objFSO = Nothing
> %>
>
> Meindert, MCP
>
>



 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      09-20-2003
Maybe this.
http://www.aspfaq.com/2180

Ray at home

"PB4FUN" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> the page hangs.
>
> <%
> Dim objFSO
> Set objFSO = Server.CreateObject("Scripting.FileSystemObject")



 
Reply With Quote
 
PB4FUN
Guest
Posts: n/a
 
      09-20-2003
Thanx, it works !!!!

Meindert, MCP

"Aaron Bertrand [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Use something less intrusive than Norton.
> http://www.aspfaq.com/2180
>
>
>
>
>
> "PB4FUN" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
> > If I comment #2 to #5 no problems.
> > If I uncomment #2, #4 and #5 the page hangs.
> > Even did not reach the point to uncomment #3
> > So, whats wrong. Do i have to alter some serversettings, and if so, what
> > should be changed ?
> >
> > OS : W2KP/IIS
> > CPU PII 350 MHz
> > Mem >500 MB
> >
> > <%
> > Dim objFSO
> > Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
> > Dim objTextStream
> > const strFileName = "F:\FileShare\resume.txt"
> > const fsoForReading = 1
> > If objFSO.FileExists("F:\FileShare\resume.txt") then
> > #1
> > 'The file exists, so open it and output its contents
> > Set objTextStream = objFSO.OpenTextFile(strFileName,

> fsoForReading)
> > #2
> > Response.Write "" & objTextStream.ReadAll & ""
> > #3
> > objTextStream.Close
> > #4
> > Set objTextStream = Nothing
> > #5
> > Response.Write strFileName & " was found."
> > Else
> > 'The file did not exist
> > Response.Write strFileName & " was not found."
> > End If
> >
> > Set objFSO = Nothing
> > %>
> >
> > Meindert, MCP
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving the web, charset problems and symbols problems Sak Na rede Ruby 0 01-30-2009 05:05 AM
Problems, problems for newbie Shelly ASP .Net 1 09-03-2007 02:10 AM
Problems compiling simple C++ code (also problems with std::string) Susan Baker C++ 2 06-26-2005 01:43 AM
Re: sound problems and modem problems Harold Potter Computer Support 5 12-04-2003 04:12 PM



Advertisments