473,587 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Lock application for use by one user at a time

Hello.

I recently wrote an application that reads from a database and calls
a webservice to output an xml file to an FTP directory. I published
this application so that a couple of people in my department could use
it.

However, I now run into the problem where 2 or more people might use
the application at a time. What I need to know is how to lock down the
application so that it can only be used by one person at a time.
However since the application is run on 3 different machines the
solution is blurry to me.

Maybe there is a to limit connections to the database for a given
user? This application uses a specific username in its connection
string. Am I headed in the right direction with this?

Thanks In Advance

Oct 18 '06 #1
2 1545
If you're using a membership provider for authentication then maybe you
could use the Membership.GetN umberOfUsersOnl ine() method, and only one
user at a time to login?

http://msdn2.microsoft.com/en-us/lib...ersonline.aspx

A better solution might be to queue up requests for your web service
and process them sequentially.

UnglueD wrote:
Hello.

I recently wrote an application that reads from a database and calls
a webservice to output an xml file to an FTP directory. I published
this application so that a couple of people in my department could use
it.

However, I now run into the problem where 2 or more people might use
the application at a time. What I need to know is how to lock down the
application so that it can only be used by one person at a time.
However since the application is run on 3 different machines the
solution is blurry to me.

Maybe there is a to limit connections to the database for a given
user? This application uses a specific username in its connection
string. Am I headed in the right direction with this?

Thanks In Advance
Oct 18 '06 #2
Sounds like you have a design problem here that you ned to fix rather than
looking to impose a restriction. Thousands of users should be able to use
your asp.net app at the same time, so perhaps your webservice is performing
the wrong task. Why dont you think about having the users pull the data
from the asp.net cache, or simply from a shared file so they can all read
the data, and if the cache values have expired or the file has gone out of
date you update the file using the next request. You could actually create
a service that updates the file and only ever have the users read from it if
that helped.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
"UnglueD" <Br**********@g mail.comwrote in message
news:11******** *************@e 3g2000cwe.googl egroups.com...
Hello.

I recently wrote an application that reads from a database and calls
a webservice to output an xml file to an FTP directory. I published
this application so that a couple of people in my department could use
it.

However, I now run into the problem where 2 or more people might use
the application at a time. What I need to know is how to lock down the
application so that it can only be used by one person at a time.
However since the application is run on 3 different machines the
solution is blurry to me.

Maybe there is a to limit connections to the database for a given
user? This application uses a specific username in its connection
string. Am I headed in the right direction with this?

Thanks In Advance

Oct 18 '06 #3

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

Similar topics

0
3372
by: Bruce Pullen | last post by:
DB2 v7.2 (FP7 - DB2 v7.1.0.68) on AIX 5.2.0.0. We're seeing unexpected single row (then commit) insert locking behaviour. We're seeing Applications that already hold row-level W locks in lock-wait, waiting to acquire row-level X locks. The lock-waits are behind applications that have row-level X locks on different rows (honestly). Both...
2
3678
by: Trent | last post by:
Hello, all. I have the following production DB2 environment. DB2 8.1.4 (fp4) WG edition with 2 production databases on Windows 2003 standard edition. My first question is regard with locking. I found some escalations for X lock on some tables. How do I work out an appropriate MAXLOCK & LOCKTIMEOUT settings to optimize the lock...
0
17759
by: Nashat Wanly | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui06032003.asp Don't Lock Type Objects! Why Lock(typeof(ClassName)) or SyncLock GetType(ClassName) Is Bad Rico Mariani, performance architect for the Microsoft® .NET runtime and longtime Microsoft developer, mentioned to Dr. GUI in an e-mail conversation...
0
3162
by: Andrew Dowding | last post by:
Hi Everybody, I have been looking at problems with my Windows Forms C# application and it's little Jet 4 (Access) database for the last few days. The Windows Forms app implements a facade and implementation, data abstraction layer. But because each data adapter in the implementation layer has a connection object that opens and closes as...
2
1537
by: zorro | last post by:
Hello there, To lock or not to lock, that is my question... I have an arrayList in my application object. The arrayList contains objects of a class that I defined. I have my own mechanisms that ensure that only one user at a time can modify a given object's properties, but another user could modify another object's properties at the same...
2
2891
by: Kevin Frey | last post by:
Hello, I've been reading that ASP.NET serialises (ie. processes one at a time) HTTP requests if two simultaneous requests need to access the same session state. It also makes note that ASP.NET tries to reacquire a lock on the session state every 1/2 second until the timeout is reached, and then it will forcibly release the previous users...
5
2505
by: Chakravarti Mukesh | last post by:
Hi, I want to get an event if someone locks her/his computer so that I could do some finalizations before actually locking the system. For example how can I ensure that an user close a particular application before locking her/his PC. Thanks Mukesh
2
5853
by: shenanwei | last post by:
DB2 V8.2 on AIX, type II index is created. I see this from deadlock event monitor. 5) Deadlocked Connection ... Participant no.: 2 Lock wait start time: 09/18/2006 23:04:09.911774 ...... Deadlocked Statement: Type : Dynamic Operation: Execute
5
2443
by: Jennifer.Berube | last post by:
What is it exactly that makes application.lock such a bad thing? I just need a better explanation or link to a resource desribing it's downfall.
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8216
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. ...
0
8349
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...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8221
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...
1
5719
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...
0
5395
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...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.