473,761 Members | 10,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Suggestions to control concurrent users...

pnp
Hi all,
I've developed a win C# app that is actually database driven using SQL
server 2000. The idea is that only one application will be installed on
a server in a network and the program will be able to run at each client
machine by just double-clicking the application executable through a
network share. The program supports user logins.
What I want to do is find a secure way to control the number of
concurrent *users* using the application.
Any suggestions?
Nov 17 '05 #1
8 4029
pnp,

You could use transactions on the database level to do this, but I think
that is a bad idea. If you have to pass connections across objects, or use
other transactional resources, then doing that will not work.

Rather, I would recommend that you use the classes in the
System.Enterpri seServices namespace to create COM+ components. With these,
you can specify transaction boundaries which will allow resources to
register with COM+, and have COM+ control the transaction.

Or, you can use the classes in the System.Transact ions namespace, if you
are using .NET 2.0.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:e4******** ******@TK2MSFTN GP15.phx.gbl...
Hi all,
I've developed a win C# app that is actually database driven using SQL
server 2000. The idea is that only one application will be installed on a
server in a network and the program will be able to run at each client
machine by just double-clicking the application executable through a
network share. The program supports user logins.
What I want to do is find a secure way to control the number of concurrent
*users* using the application.
Any suggestions?

Nov 17 '05 #2
You can maintain statistical data about users logged in the system at anyone
time in the SQL Server database. When the app initializes the first thing
is to check that number against the maximum allowed, and if more gracefully
shutdown.

User starts app: UPDATE UserStats set usercount=userc ount+1;
User shutsdown app (after a successful start): UPDATE UserStats set
usercount=userc ount-1;

Alex

"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:e4******** ******@TK2MSFTN GP15.phx.gbl...
Hi all,
I've developed a win C# app that is actually database driven using SQL
server 2000. The idea is that only one application will be installed on a
server in a network and the program will be able to run at each client
machine by just double-clicking the application executable through a
network share. The program supports user logins.
What I want to do is find a secure way to control the number of concurrent
*users* using the application.
Any suggestions?

Nov 17 '05 #3
Alex,

This will not solve the problem, though. It's not about how many users
are on the app, what matters is that they are all hitting the same data
source at the same time. If you have operations that require more than one
operation, then you need to wrap that in a transaction, so that the state of
the app doesn't become corrupted (where another user can see only a part of
a change that was made, and then acts upon it).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Alex Passos" <bz@netmerlin.n ospam.com> wrote in message
news:ek******** ******@TK2MSFTN GP15.phx.gbl...
You can maintain statistical data about users logged in the system at
anyone time in the SQL Server database. When the app initializes the
first thing is to check that number against the maximum allowed, and if
more gracefully shutdown.

User starts app: UPDATE UserStats set usercount=userc ount+1;
User shutsdown app (after a successful start): UPDATE UserStats set
usercount=userc ount-1;

Alex

"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:e4******** ******@TK2MSFTN GP15.phx.gbl...
Hi all,
I've developed a win C# app that is actually database driven using SQL
server 2000. The idea is that only one application will be installed on a
server in a network and the program will be able to run at each client
machine by just double-clicking the application executable through a
network share. The program supports user logins.
What I want to do is find a secure way to control the number of
concurrent *users* using the application.
Any suggestions?


Nov 17 '05 #4

"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:e4******** ******@TK2MSFTN GP15.phx.gbl...
Hi all,
I've developed a win C# app that is actually database driven using SQL
server 2000. The idea is that only one application will be installed on a
server in a network and the program will be able to run at each client
machine by just double-clicking the application executable through a
network share. The program supports user logins.
What I want to do is find a secure way to control the number of concurrent
*users* using the application.
Any suggestions?


Why do you need to restrict the number of users? Is it a SQL performance or
a licence issue or something else.
I suppose you application is transaction safe (that is multi-user ready) so
that's no issue right?

Willy.


Nov 17 '05 #5
He has only mentioned that he wants to control the number of concurrent
users on his app, not on SQL Server, but I completely understand your point.
More information is needed. from the OP.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:u8******** ******@tk2msftn gp13.phx.gbl...
Alex,

This will not solve the problem, though. It's not about how many users
are on the app, what matters is that they are all hitting the same data
source at the same time. If you have operations that require more than
one operation, then you need to wrap that in a transaction, so that the
state of the app doesn't become corrupted (where another user can see only
a part of a change that was made, and then acts upon it).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Alex Passos" <bz@netmerlin.n ospam.com> wrote in message
news:ek******** ******@TK2MSFTN GP15.phx.gbl...
You can maintain statistical data about users logged in the system at
anyone time in the SQL Server database. When the app initializes the
first thing is to check that number against the maximum allowed, and if
more gracefully shutdown.

User starts app: UPDATE UserStats set usercount=userc ount+1;
User shutsdown app (after a successful start): UPDATE UserStats set
usercount=userc ount-1;

Alex

"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:e4******** ******@TK2MSFTN GP15.phx.gbl...
Hi all,
I've developed a win C# app that is actually database driven using SQL
server 2000. The idea is that only one application will be installed on
a server in a network and the program will be able to run at each client
machine by just double-clicking the application executable through a
network share. The program supports user logins.
What I want to do is find a secure way to control the number of
concurrent *users* using the application.
Any suggestions?



Nov 17 '05 #6
pnp
It is not an SQL server license issue, but my own applications license
issue.

The problem with storing data in the SQL server db is that if one of the
instances of the app fail to close correctly, my db will have the
wrong number of concurrent users, which can result in bigger problems
(one could eventualy not be able to log in).

But I would like a little more information on using COM+ to control the
users. Nicholas, can you please describe me a scenario in a little more
detail?

(I would rather not use the .NET 2.0 yet)

Willy Denoyette [MVP] wrote:
"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:e4******** ******@TK2MSFTN GP15.phx.gbl...
Hi all,
I've developed a win C# app that is actually database driven using SQL
server 2000. The idea is that only one application will be installed on a
server in a network and the program will be able to run at each client
machine by just double-clicking the application executable through a
network share. The program supports user logins.
What I want to do is find a secure way to control the number of concurrent
*users* using the application.
Any suggestions?

Why do you need to restrict the number of users? Is it a SQL performance or
a licence issue or something else.
I suppose you application is transaction safe (that is multi-user ready) so
that's no issue right?

Willy.

Nov 17 '05 #7

"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:u4******** ******@TK2MSFTN GP10.phx.gbl...
It is not an SQL server license issue, but my own applications license
issue.

The problem with storing data in the SQL server db is that if one of the
instances of the app fail to close correctly, my db will have the
wrong number of concurrent users, which can result in bigger problems (one
could eventualy not be able to log in).

But I would like a little more information on using COM+ to control the
users. Nicholas, can you please describe me a scenario in a little more
detail?

(I would rather not use the .NET 2.0 yet)

Ok, this is what I had guessed.
You need to track of the numer of instances running, well the best place to
do it is in the database. The problem with "vanishing applications", can be
solved by means of a stored procedure that each application has to execute
at regular intervals to update it's "state", a watch dog running in SQL
server could remove non updated entries at regular intervals.
Using COM+ for this is not an option IMO, as it's a single point of failure,
if the COM+ (or any other solution based on a centralized service) fails, it
would prevent your applications to be started while otherwise your SQL
server might be in perfect shape.

Willy.

Nov 17 '05 #8
pnp
Another problem could be that an advanced user could create a stored
procedure that deletes all the entries that are inserted in the db
continuously (or triggered by an insertion) so he could bypass my user
control scenario.

Willy Denoyette [MVP] wrote:
"pnp" <pnp.@.softlab. ntua.gr> wrote in message
news:u4******** ******@TK2MSFTN GP10.phx.gbl...
It is not an SQL server license issue, but my own applications license
issue.

The problem with storing data in the SQL server db is that if one of the
instances of the app fail to close correctly, my db will have the
wrong number of concurrent users, which can result in bigger problems (one
could eventualy not be able to log in).

But I would like a little more information on using COM+ to control the
users. Nicholas, can you please describe me a scenario in a little more
detail?

(I would rather not use the .NET 2.0 yet)


Ok, this is what I had guessed.
You need to track of the numer of instances running, well the best place to
do it is in the database. The problem with "vanishing applications", can be
solved by means of a stored procedure that each application has to execute
at regular intervals to update it's "state", a watch dog running in SQL
server could remove non updated entries at regular intervals.
Using COM+ for this is not an option IMO, as it's a single point of failure,
if the COM+ (or any other solution based on a centralized service) fails, it
would prevent your applications to be started while otherwise your SQL
server might be in perfect shape.

Willy.

Nov 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3530
by: bluedolphin | last post by:
There seems to be a consensus that Access has a concurrent user limit of 200 users. I am working on a system that currently stands at approx. 1 gig and has a small number of users. However, there is a project on the horizon that I have been asked to implement (within 2 months) where there will potentially be 1200 users accessing the backend through a Cold Fusion Interface. Whenever, I have been looking at this many users, I have always...
1
2891
by: Krysa | last post by:
Access 2K, DAO, split front end and back end; back end on server. Regarding max of 255 concurrent users. Is it really users, or connections? How would a user have more than one connection to same back end? If I keep a bound form open (hidden) to maintain a persistent connection, in what circumstances would another connection be created? How do I count the number of connections to a back end? Inquiring minds want to know, will be very...
3
4448
by: mgPA | last post by:
Short: How can I limit the number of concurrent logins to Access (2000) DB? Long: I seem to be having the problem discussed in previous postings of having more than 9 or 10 concurrent logins. If I can limit the number of concurrent logins to 8 or 9, that would satisfy our needs. Thanks
2
2372
by: Adnan | last post by:
Hey Ppl, I'm developing an Online Auction Site using ASP.net and am experiencing a problem with Transactions in ADO.Net. When beginTrasaction() function is invoked from a specific connection, and insertions are made into a table, no other connection can access the table, until the transaction is committed. I've set the Isoloation level to ReadUncommited.
6
3346
by: Bill Manring | last post by:
I have an ASP.NET application which my company sells comercially. We license on a concurrent user model, but we currently rely on the "honor" system for the customers to give us their best guess as to the maximum number of concurrent users they will need. We do this because, so far, we have not been able to come up with any mechanism for reliably monitoring how many users have active sessions and locking out users until a license becomes...
6
15422
by: krvrk | last post by:
Hi, I am creating a report for which i need to query a table for total number of users and Concurrent users logged in. The table will contain Username(nvarcar,not null),SessionStart time(datetime, not null), SessionEnd time (datetime,null), SessionID(int,not null) and ConnectGUID(uniqueidentifier, not null) etc can any one help me in finding total and number of concurrent logins per day. Sample Data
2
19344
by: mktselvan | last post by:
Hi, Existing running oracle application 11i (11.5.8) Database version is 8.1.7.4 There is any command / way to know the number of concurrent users for this application. select SESSIONS_MAX, SESSIONS_WARNING,
6
2384
by: mastanrao | last post by:
I want to findout how many concurrent users are avilable an application and i want allow 4 concurrent users with same username and password and i want to restrict 5 user.whenever user singout 5 with user to be allowed.Please tell me the solution asap. advanced Thanks a lot
0
13361
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed programatically either from UNIX or Oracle PLSQL. In this Section, I will be explaining about calling a Concurrent program from UNIX using the CONCSUB Command. Pre-requisite: 1. Concurrent Program should be registered in oracle Applications...
0
10115
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.