Solved

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

Posted on 2003-11-23
5
398 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

744 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

11 Experts available now in Live!

Get 1:1 Help Now