Why is asp FileSystemObject hanging IIS?

just need to write a text file... duh

Page 1 of 1

5 Replies - 2400 Views - Last Post: 03 April 2002 - 08:31 AM Rate Topic: -----

#1 WebDevTool  Icon User is offline


Reputation: 0
  • View blog
  • Posts: -8,388,608
  • Joined: 27-February 02

Why is asp FileSystemObject hanging IIS?

Posted 02 April 2002 - 11:25 AM

My IIS (pws) hangs when I call the following code:

<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td colspan="3" bgcolor="#CCCCCC">
<%
Response.Write now

OpenFSO
OpenFile("1111-2222")

objFile.WriteLine(htmlHead)
objFile.WriteLine(htmlContent)
objFile.WriteLine(htmlFoot)

CloseFile
CloseFSO

Response.Write now
%>
</td>
</tr>
</table>


Simple enough, right? In the included file, I have:
.
.
.
Function OpenFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
End Function

Function OpenFile(id)
if len(id) < 1 then
id = "xxxx-yyyy"
end if
strFilename = "localtempchg_" & id & ".html"
objFile = objFSO.OpenTextFile(Server.MapPath(strFilename), fsoForWriting, True)
End Function

Function CloseFile
objFile.Close
Set objFile = Nothing
End Function

Function CloseFSO
objFSO.Close
Set objFSO = Nothing
End Function

.
.
.

Once hung, NOTHING is hosted correctly, AND I cannot stop the IIS service, I have to reboot.

Need to allow asp to create and write to a html file. I can do it in VB (application) but not in asp (apparently).

I have never done this before with asp, so any help is good help. (Aside from the "Help" I found on 4Guys)

(Edited by WebDevTool at 8:42 am on April 3, 2002)


Is This A Good Question/Topic? 0
  • +

Replies To: Why is asp FileSystemObject hanging IIS?

#2 SlashRaid  Icon User is offline

  • Dream.In.Force

Reputation: 1
  • View blog
  • Posts: 2,421
  • Joined: 21-January 02

Re: Why is asp FileSystemObject hanging IIS?

Posted 02 April 2002 - 11:27 AM

Turn the smilies off in your post.
Was This Post Helpful? 0
  • +
  • -

#3 WebDevTool  Icon User is offline


Reputation: 0
  • View blog
  • Posts: -8,388,608
  • Joined: 27-February 02

Re: Why is asp FileSystemObject hanging IIS?

Posted 03 April 2002 - 06:45 AM

Good advice about the smilies.

It seems like ANY call to the FileSystemObject is hanging PWS, no matter how simple I try to make the code. The above makes up a combination of all of the parts I need, the MapPath gizmo, and such...

Was This Post Helpful? 0
  • +
  • -

#4 SlashRaid  Icon User is offline

  • Dream.In.Force

Reputation: 1
  • View blog
  • Posts: 2,421
  • Joined: 21-January 02

Re: Why is asp FileSystemObject hanging IIS?

Posted 03 April 2002 - 07:12 AM

I wonder if you could have some one else run the code and see if they have the same problem as you. The hang seems some what suspicous to me, but I'm really way out of my league on this one.

How good do you feel about your IIS setup? If some one else could get the same result.... Well then I guess it would have to be something in the code. Just wondering really.

Was This Post Helpful? 0
  • +
  • -

#5 WebDevTool  Icon User is offline


Reputation: 0
  • View blog
  • Posts: -8,388,608
  • Joined: 27-February 02

Re: Why is asp FileSystemObject hanging IIS?

Posted 03 April 2002 - 07:22 AM

That's what I'm thinking. Maybe my pws is broken? I have NO IDEA how to set up the permissions on the write-to folder, this could also be an issue... The book said the server would return an error if the "IUser_machinename" didn't have high enough rights to write to a file/folder. [Willie Wanka]I get NOTHING, good DAY, SIR![/Willie Wanka]

(Edited by WebDevTool at 9:48 am on April 3, 2002)

Was This Post Helpful? 0
  • +
  • -

#6 WebDevTool  Icon User is offline


Reputation: 0
  • View blog
  • Posts: -8,388,608
  • Joined: 27-February 02

Re: Why is asp FileSystemObject hanging IIS?

Posted 03 April 2002 - 08:31 AM

Well, I have to reboot before I know if this is sucessful, but it makes sense.

http://search.micros...s/Q295/3/75.ASP

Describes the conflict between my NortonAntiVirus (script blocking) and the FileSystemObject. I guess for the sake of completeness I should also note that the "function"s in the include file have become "sub"s...

<edit>
After re-booting without NAV script blocking... Houston, we HAVE LIFT-OFF!
</edit>

(Edited by WebDevTool at 12:56 pm on April 3, 2002)

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1