ASP file upload with IIS 5.1 problem

T

TontonJP

Hi,

I have a standard WinXP Pro/IIS 5.1/ASP 3.0/MS Access setup at home,
which I use to develop web apps as a hobby.

I'm trying to upload stuff from a html form's file input field and
handle it with the MetaBuilders.FileUp.wsc component, which I used all
the time at work (Win2000 Server/IIS 5.0) and worked fine.

The files are uploaded correctly, and I can save them wherever I want
- so permissions seem to be set properly - but here is the problem:
after a few uses of this script, the thing hangs, and I end up getting
a 403.9 - too many users... error.

I fished around the Google groups search about this, and it seems to
have happened to other people, but I couldn't find a definitive
answer. It seems to have something to do with the code eating up HTTP
connections - IIS 5.1 is limited to 10 or 11 of those.

At first, I thought that it was the FileSystemObject that ate these
connections, but even if I don't save the file to the file system, the
same thing happens. I checked, and the only time the FSO object is
used within the fileup component is when the save() and saveas()
methods are called, which I do not do.

Before people tell me these:

1) No, it has nothing to do with antivirus software, since I have none
installed. (Yes, I live dangerously...)

2) No, there are not too many people hitting the web app - I am the
only one connected to it, it's on my home network.

3) No, I don't want to buy a server OS with a "real" web server.

4) I doubt it has anything to do with my ASP code, since I religiously
close connections and destroy objects, and especially since the code
ran well on PWS...

The practical implication of this issue is that IIS 5.1 cannot be used
to serve anything using file uploads. I have a hard time believing
this is by design, since it seriously impedes any real development
effort...

Anyways, any insight would be most welcome.
 
D

Dave Anderson

TontonJP said:
I have a standard WinXP Pro/IIS 5.1/ASP 3.0/MS Access setup...

...after a few uses of this script, the thing hangs, and I end
up getting a 403.9 - too many users... error.

You're definitely bumping up against the 10-session limit of IIS on XP
Professional. Let's continue...

...No, there are not too many people hitting the web app - I
am the only one connected to it, it's on my home network.

That's not really a guarantee that you won't run out of sessions. Every time
you open a new browser window, you potentially create a new session. And
that includes browser windows opened from your IDE (VS.Net, InterDev,
Dreamweaver, etc.).

...No, I don't want to buy a server OS with a "real" web server.

Then you will have to make accomodations for this problem. If you don't use
session variables very heavily -- and you shouldn't -- you can probably get
away with shortening the default session length in IIS.

Before I started using a server OS, I had a similar problem, due to my
propensity to test with a multitude of browsers (as well as the fact that
many of my coworkers access some of the tools on my box, which I originally
wrote for myself). Fortunately for me, I had no dependence on sessions, so
cranking the session length down to 60 seconds did the trick *completely and
forever*.

I doubt it has anything to do with my ASP code, since I
religiously close connections and destroy objects, and
especially since the code ran well on PWS...

I'm sure you are right, but for the wrong reasons. Session saturation really
has much more to do with the number of windows opened than anything else.
Since you are dealing with a stateless connection, the server has no idea
that it was supposed to abandon the session in response to a closed window.
If you don't believe me, repeatedly open and close IE (pointing to a static
page with no server-side code) until you run out of sessions. It won't take
long.

The practical implication of this issue is that IIS 5.1 cannot
be used to serve anything using file uploads. I have a hard
time believing this is by design, since it seriously impedes
any real development effort...

This is clearly not the case, since you can use it successfully for a while.
Practice a little session management, and you'll be fine. If you can't
simply shorten the session timeout, you might be able to judiciously use
Session.Abandon() to accomplish the same thing.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
J

Jeff Cochran

The files are uploaded correctly, and I can save them wherever I want
- so permissions seem to be set properly - but here is the problem:
after a few uses of this script, the thing hangs, and I end up getting
a 403.9 - too many users... error.

Then you're running into the user limitation of a workstation
operating system. You need to upgrade to a server version of your OS
to avoid this.
I fished around the Google groups search about this, and it seems to
have happened to other people, but I couldn't find a definitive
answer. It seems to have something to do with the code eating up HTTP
connections - IIS 5.1 is limited to 10 or 11 of those.

At first, I thought that it was the FileSystemObject that ate these
connections, but even if I don't save the file to the file system, the
same thing happens. I checked, and the only time the FSO object is
used within the fileup component is when the save() and saveas()
methods are called, which I do not do.

FSO doesn't affect connections, but your component could be making
extra connections and not releasing them, or not releasing them until
you hit the session timeout limit. You might be able to tweak the
timeout setting to improve your situation, though it may cause you
other problems in the process.
Before people tell me these:

1) No, it has nothing to do with antivirus software, since I have none
installed. (Yes, I live dangerously...)

2) No, there are not too many people hitting the web app - I am the
only one connected to it, it's on my home network.

"People" don't translate to "connections". One person could make many
connections.
3) No, I don't want to buy a server OS with a "real" web server.

Then you'll always be limited in some respect as to what you can do on
your system.
4) I doubt it has anything to do with my ASP code, since I religiously
close connections and destroy objects, and especially since the code
ran well on PWS...

Well, not if you have sessions, but I don't think it's your code, or
at least not solely your code. Sounds more like the upload component
you use.
The practical implication of this issue is that IIS 5.1 cannot be used
to serve anything using file uploads. I have a hard time believing
this is by design, since it seriously impedes any real development
effort...

It served file uploads fine for you, until you hit its limits. And
yes, it can impede development efforts. But you're caught between two
choices and refuse to choose either one. Either you need to develop
on a server operating system (or have one available for test) or you
need to live with the limitations of not having a server operating
system available. There's no problem with developing to a non-server
operating system if you can live within the limitations. But there
are limitations.

Jeff
 
T

Tonton JP

Wow, that was quick! ;o))

Thanks for the feedback guys, it's nice to see some people still take
the time to help others. Unfortunately, it seems to me that my problem
won't find a satisfying solution...

To clairify my situation, I do not intend to move the application to a
production server - I only do this at home and expect the app to run
properly for more than testing purposes.

For once, I'm not using session variables on this app. I usually only
use sessions to store a user ID and interface language in secure apps,
but this one is not secured. Still, I'll try to systematically abandon
the session in my footer include, and see if it helps.

I've tried opening and closing the browser multiple times (50 or so...)
with a static page on my server. The sessions must be recycled in this
instance, because it never throws a "too many users" error. I've also
tried with an ASP page that does quite a bit of work - it lists stuff
from an Access db according to search and ordering criteria. Still no
error.

I'm starting to think it might have something to do with the use of the
"multipart/form-data" encoding on the form, since it only seems to
happen when there's a file control involved.

The reason I'm pursuing this issue is that, whether IIS 5.1 is made for
personal purposes or professional development purposes - in which case
the finished code is trasferred to and run from a production server, I
cannot believe it should hang after having done 5 or 6 file uploads.

In any case, I'd like to understand what is really going on here, even
if its not "fixable".

Again, thanks for your time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top