473,406 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Multiple user problems

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
9 2417
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
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
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
"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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ramses van Pinxteren | last post by:
hello, I have a PHP/Javascript problem. If I want to make a multiple select like this one: $html .= "<td><select name='userid' onChange='changeuserinfo()' multiple size='10'>"; $html .=...
1
by: intl04 | last post by:
Are there any problems with multiple user access to the same Access database on a shared network drive? I have 'shared' chosen for 'default open mode'. As for the record locking properties, I...
1
by: Johan | last post by:
If a user happens to open multiple instances of her frontend, what kind of problems can occur? For example, one user reported that she was able to, once or twice, bypass the evaluation...
5
by: James Black | last post by:
Hello, I am understanding that a single user can have multiple desktops under XP. My guess is that this is similar to unix where I can switch from one desktop to another, so there is multiple...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
47
by: Larry Smith | last post by:
I just read a blurb in MSDN under the C++ "ref" keyword which states that: "Under the CLR object model, only public single inheritance is supported". Does this mean that no .NET class can ever...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.