By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

Multiple user problems

P: n/a
Hello,
I am having a problem with multiple users using my asp.net application -
namely that if each user clicks save at the same time, some, or all, of the
users crash out.
Do I need to do anything in particular to 'queue' their requests or should
asp.net do this?
Any help would be very useful,
jsale
Nov 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
You can test whether the server is not handling load, but a few users
clicking at the same time is not normally a load problem. As such, I would
look at the application architecture (ie, the code) for a solution.

What do you mean by "crash out"? Do you mean they are getting .NET exception
messages? If so, what exception message? Or, does the app not work at all
(empty browser screen)?

There are a lot of things that could be going on. For example, if the users
are all retrieving the same data, you could get concurrency issues. That
would be normal and can be handled in your application. If concurrency is an
issue, you can rearchitect to avoid it or handle it. There are articles on
the MSDN site on concurrency handling.

What I am getting at is I am not sure what is happening in your application.
It is very hard to suggest a solution without truly understanding the
problem. Be a bit more specific about exactly what is happening.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"jsale" wrote:
Hello,
I am having a problem with multiple users using my asp.net application -
namely that if each user clicks save at the same time, some, or all, of the
users crash out.
Do I need to do anything in particular to 'queue' their requests or should
asp.net do this?
Any help would be very useful,
jsale

Nov 19 '05 #2

P: n/a
Please define "crash out". They must be all accessing a common resource
incorrectly. There should be an error message somewhere.

"jsale" wrote:
Hello,
I am having a problem with multiple users using my asp.net application -
namely that if each user clicks save at the same time, some, or all, of the
users crash out.
Do I need to do anything in particular to 'queue' their requests or should
asp.net do this?
Any help would be very useful,
jsale

Nov 19 '05 #3

P: n/a
sorry, i thought i'd start as broad as possible, save giving you all the
details straight away :)
i'm using an asp.net app that is connected to a sql server database and uses
classes to hold the data retreived from the database by each user. to make
sure each user only sees their own retrieved data, i am putting the classes
into session.
eg session("XProject")
in the page load of every page that uses the classes, i am then calling from
the session
eg Xproject = session("XProject")

The errors that appear are different in many ways, for instance when more
than one user clicks save at the same time, one user may have an error trying
to move from one page to another (ie their instance of the application is
'looking' for their chosen report in other people's data). there is not a
specific error that the transaction is failing, but the fact that 4 users all
trying to write/ read at the same time all get errors has got to be more than
purely coincidental.
Nov 19 '05 #4

P: n/a
"jsale" <js***@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
sorry, i thought i'd start as broad as possible, save giving you all the
details straight away :)
i'm using an asp.net app that is connected to a sql server database and
uses
classes to hold the data retreived from the database by each user. to make
sure each user only sees their own retrieved data, i am putting the
classes
into session.
eg session("XProject")
in the page load of every page that uses the classes, i am then calling
from
the session
eg Xproject = session("XProject")

The errors that appear are different in many ways, for instance when more
than one user clicks save at the same time, one user may have an error
trying
to move from one page to another (ie their instance of the application is
'looking' for their chosen report in other people's data). there is not a
specific error that the transaction is failing, but the fact that 4 users
all
trying to write/ read at the same time all get errors has got to be more
than
purely coincidental.


You're not putting classes into session, you're putting references to
objects (class instances) into session.

You still need to tell us the details. What "error" are the users seeing.
You're not giving us enough information to help you.

John Saunders
Nov 19 '05 #5

P: n/a
one of many errors is "argument 'index' is not a valid value", a
system.argument exception, this is because once saved, the program looks for
the data in the *instance* of the class using an index key. the index key it
is looking for cannot be found in the returned dataset because it is being
searched for in another users' instance of the classes. My app appears to be
leaking data between users, but i cannot understand how as all classes and
variables are instanced using session.
your guess is hopefully better than mine :)

"John Saunders" wrote:
"jsale" <js***@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
sorry, i thought i'd start as broad as possible, save giving you all the
details straight away :)
i'm using an asp.net app that is connected to a sql server database and
uses
classes to hold the data retreived from the database by each user. to make
sure each user only sees their own retrieved data, i am putting the
classes
into session.
eg session("XProject")
in the page load of every page that uses the classes, i am then calling
from
the session
eg Xproject = session("XProject")

The errors that appear are different in many ways, for instance when more
than one user clicks save at the same time, one user may have an error
trying
to move from one page to another (ie their instance of the application is
'looking' for their chosen report in other people's data). there is not a
specific error that the transaction is failing, but the fact that 4 users
all
trying to write/ read at the same time all get errors has got to be more
than
purely coincidental.


You're not putting classes into session, you're putting references to
objects (class instances) into session.

You still need to" are th tell us the details. What "errore users seeing.
You're not giving us enough information to help you.

John Saunders

Nov 19 '05 #6

P: n/a
You are using likely shared (VB.NET) or static (C#) variables. They are
shared by the whole application (in ASP.NET it means all users using the
site). Do you use these kind of variables ?

Patrice

--

"jsale" <js***@discussions.microsoft.com> a écrit dans le message de
news:9D**********************************@microsof t.com...
one of many errors is "argument 'index' is not a valid value", a
system.argument exception, this is because once saved, the program looks for the data in the *instance* of the class using an index key. the index key it is looking for cannot be found in the returned dataset because it is being
searched for in another users' instance of the classes. My app appears to be leaking data between users, but i cannot understand how as all classes and
variables are instanced using session.
your guess is hopefully better than mine :)

"John Saunders" wrote:
"jsale" <js***@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
sorry, i thought i'd start as broad as possible, save giving you all the details straight away :)
i'm using an asp.net app that is connected to a sql server database and uses
classes to hold the data retreived from the database by each user. to make sure each user only sees their own retrieved data, i am putting the
classes
into session.
eg session("XProject")
in the page load of every page that uses the classes, i am then calling from
the session
eg Xproject = session("XProject")

The errors that appear are different in many ways, for instance when more than one user clicks save at the same time, one user may have an error
trying
to move from one page to another (ie their instance of the application is 'looking' for their chosen report in other people's data). there is not a specific error that the transaction is failing, but the fact that 4 users all
trying to write/ read at the same time all get errors has got to be more than
purely coincidental.


You're not putting classes into session, you're putting references to
objects (class instances) into session.

You still need to" are th tell us the details. What "errore users seeing. You're not giving us enough information to help you.

John Saunders

Nov 19 '05 #7

P: n/a
Thanks for your reply,
My app is built on classes that represent data retrieved from the sql server
DB. None of my variables are private, but they are not declared as 'shared'
either. I don't know if I've confused how to use session (i've never used it
before), but i am getting problems of users seeing each other's data on reads
and writes, usually between page redirects. To explain, in the page_load of
each page, i read the session into my base classes:
XProject = Session("X")
where XProject is a class with variables/ functions etc. I do this with the
classes and the connection string itself, but only write out to the session
when I initialise it. I don't think there is any need to write back to the
session each time i redirect is there? That is the only thing left i can
think of that I'm not doing!
"Patrice" wrote:
You are using likely shared (VB.NET) or static (C#) variables. They are
shared by the whole application (in ASP.NET it means all users using the
site). Do you use these kind of variables ?

Patrice

--

"jsale" <js***@discussions.microsoft.com> a écrit dans le message de
news:9D**********************************@microsof t.com...
one of many errors is "argument 'index' is not a valid value", a
system.argument exception, this is because once saved, the program looks

for
the data in the *instance* of the class using an index key. the index key

it
is looking for cannot be found in the returned dataset because it is being
searched for in another users' instance of the classes. My app appears to

be
leaking data between users, but i cannot understand how as all classes and
variables are instanced using session.
your guess is hopefully better than mine :)

"John Saunders" wrote:
"jsale" <js***@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
> sorry, i thought i'd start as broad as possible, save giving you all the > details straight away :)
> i'm using an asp.net app that is connected to a sql server database and > uses
> classes to hold the data retreived from the database by each user. to make > sure each user only sees their own retrieved data, i am putting the
> classes
> into session.
> eg session("XProject")
> in the page load of every page that uses the classes, i am then calling > from
> the session
> eg Xproject = session("XProject")
>
> The errors that appear are different in many ways, for instance when more > than one user clicks save at the same time, one user may have an error
> trying
> to move from one page to another (ie their instance of the application is > 'looking' for their chosen report in other people's data). there is not a > specific error that the transaction is failing, but the fact that 4 users > all
> trying to write/ read at the same time all get errors has got to be more > than
> purely coincidental.

You're not putting classes into session, you're putting references to
objects (class instances) into session.

You still need to" are th tell us the details. What "errore users seeing. You're not giving us enough information to help you.

John Saunders


Nov 19 '05 #8

P: n/a
Hi. Do you really need to save all those objects to a Session variable? Why
not retrieve it from database every time you need it?

Regards, Alejandro.

"jsale" <js***@discussions.microsoft.com> wrote in message
news:DA**********************************@microsof t.com...
Hello,
I am having a problem with multiple users using my asp.net application -
namely that if each user clicks save at the same time, some, or all, of
the
users crash out.
Do I need to do anything in particular to 'queue' their requests or should
asp.net do this?
Any help would be very useful,
jsale

Nov 19 '05 #9

P: n/a
And how is defined XProject ?

It should be quite easy to store an object using a similar method with a
kind of tag to make sure you identitied the problme (ie. you are actually
seeing data accross session).

This is not the normal behavior. I still beleive the more likely cause is
you are using a shared or static variables. If VB.NET are you suing modules.
Modules are actually classes with shared members....

Good luck

Patrice

--

"jsale" <js***@discussions.microsoft.com> a écrit dans le message de
news:D5**********************************@microsof t.com...
Thanks for your reply,
My app is built on classes that represent data retrieved from the sql server DB. None of my variables are private, but they are not declared as 'shared' either. I don't know if I've confused how to use session (i've never used it before), but i am getting problems of users seeing each other's data on reads and writes, usually between page redirects. To explain, in the page_load of each page, i read the session into my base classes:
XProject = Session("X")
where XProject is a class with variables/ functions etc. I do this with the classes and the connection string itself, but only write out to the session when I initialise it. I don't think there is any need to write back to the
session each time i redirect is there? That is the only thing left i can
think of that I'm not doing!
"Patrice" wrote:
You are using likely shared (VB.NET) or static (C#) variables. They are
shared by the whole application (in ASP.NET it means all users using the
site). Do you use these kind of variables ?

Patrice

--

"jsale" <js***@discussions.microsoft.com> a écrit dans le message de
news:9D**********************************@microsof t.com...
one of many errors is "argument 'index' is not a valid value", a
system.argument exception, this is because once saved, the program looks
for
the data in the *instance* of the class using an index key. the index
key it
is looking for cannot be found in the returned dataset because it is
being searched for in another users' instance of the classes. My app appears to be
leaking data between users, but i cannot understand how as all classes
and variables are instanced using session.
your guess is hopefully better than mine :)

"John Saunders" wrote:

> "jsale" <js***@discussions.microsoft.com> wrote in message
> news:FE**********************************@microsof t.com...
> > sorry, i thought i'd start as broad as possible, save giving you all the
> > details straight away :)
> > i'm using an asp.net app that is connected to a sql server
database and
> > uses
> > classes to hold the data retreived from the database by each user.
to make
> > sure each user only sees their own retrieved data, i am putting
the > > classes
> > into session.
> > eg session("XProject")
> > in the page load of every page that uses the classes, i am then

calling
> > from
> > the session
> > eg Xproject = session("XProject")
> >
> > The errors that appear are different in many ways, for instance when more
> > than one user clicks save at the same time, one user may have an
error > > trying
> > to move from one page to another (ie their instance of the application is
> > 'looking' for their chosen report in other people's data). there
is not a
> > specific error that the transaction is failing, but the fact that
4 users
> > all
> > trying to write/ read at the same time all get errors has got to
be more
> > than
> > purely coincidental.
>
> You're not putting classes into session, you're putting references

to > objects (class instances) into session.
>
> You still need to" are th tell us the details. What "errore users

seeing.
> You're not giving us enough information to help you.
>
> John Saunders
>
>
>


Nov 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.