Link to home
Start Free TrialLog in
Avatar of almubarak2000
almubarak2000

asked on

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

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
Avatar of Zontar
Zontar

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.
Avatar of almubarak2000

ASKER

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,
ASKER CERTIFIED SOLUTION
Avatar of Zontar
Zontar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial