Solved

IIS not Responding when try to open text file in local machine.

Posted on 2003-11-23
5
399 Views
Last Modified: 2010-04-06
I have the followling asp file:

<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)
Response.Write(f.Read(5))
f.Close
Set f=Nothing
Set fs=Nothing
%>

It stops right after the first line. I'm sure everything is correct. The file runs perfectly on my machine at work, network. At home , local machine, it stops responding. After serveral trials I get the message :
HTTP 403.9 - Access Forbidden: Too many users are connected

The problem has nothing to do with the users. I did turn off HTTP Keep-Alives Enabled

any clue?

IIS 6.0 windows Xp prof

thanks in advance
0
Comment
Question by:almubarak2000
  • 2
5 Comments
 
LVL 11

Expert Comment

by:Zontar
ID: 9814800
Does testread.txt actually exist?

Also, try using

Set f=fs.OpenTextFile( Server.MapPath("testread.txt"), 1, -2)

This will allow the file to be opened and read as the default format for the webserver (ASCII or Unicode). Also try -1 (force Unicode) and 0 (force ASCII) for the second argument. If you try to open a Unicode text file as ASCII, this can cause problems.

Also make sure that scrrun.dll exists on your system. If it's missing or corrupted, then you'd not be able to instantiate a FileSystemObject.
0
 

Author Comment

by:almubarak2000
ID: 9829624
Hello,

 The file does exist and is not corrupted. None of the parameters solved the problem. It is still the same. When I hit the file around 10 times it complains no more users can be conncted.

Any other possiblities? BTW, all the people I consulted did face the same problem when trying to do the same for stand alone PCs. On networks it works fine.

 Regards,
0
 
LVL 11

Accepted Solution

by:
Zontar earned 50 total points
ID: 9829714
It may be that you've got some other apps running on that machine that are confusing IIS because they're also instantiating COM objects. Try shutting down EVERYTHING (including any non-essential background processes) except IIS and a non-MSIE Web browser and see what happens.

Also -- if you're using localhost to access the site, try using http://192.168.0.1/ or the machine name instead, or vice versa.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to count occurrences of each item in an array.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now