Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Limit User

Reply
Thread Tools

Limit User

 
 
John Peter
Guest
Posts: n/a
 
      09-12-2003
How can i limit the number of users on my .ASP page, i want only one user to
be using the page at a time,

The query i have on my page is big and takes a lot of my system resources.

John


 
Reply With Quote
 
 
 
 
Tom B
Guest
Posts: n/a
 
      09-12-2003
<%
Application.Lock
if Application("InUse")="Yes" then
Response.Write "In Use"
Response.End
else
Application("InUse")="Yes"
end if
Application.Unlock
%>

"John Peter" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> How can i limit the number of users on my .ASP page, i want only one user

to
> be using the page at a time,
>
> The query i have on my page is big and takes a lot of my system resources.
>
> John
>
>



 
Reply With Quote
 
 
 
 
dlbjr
Guest
Posts: n/a
 
      09-13-2003
I disagree with Tom.

If the Application is locked while the code is processing no other client
will get to the application to even get a busy message.

Try this:

At the Top of the Page Place this Code:

If Not Application("PageInUse") Then
Application.Lock
Application("PageInUse") = True
Application.UnLock
Else
Response.Write "Page In Use"
'Redirect if needed
Response.End
End If

At the Bottom of the Page Place this Code:

Application.Lock
Application("PageInUse") = False
Application.UnLock



-dlbjr

invariable unerring alien


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I limit the bandwidth to each user on the wireless router? =?Utf-8?B?QWxleA==?= Wireless Networking 4 06-14-2012 09:16 AM
Some shareware has a time limit and the software will not work after the time limit has expired. anthony crowder Computer Support 20 01-16-2007 10:01 AM
c program, file size limit, how to solve? 2G bytes limit. guru.slt@gmail.com C++ 1 06-27-2005 11:05 PM
Limit user logons Patrick Cisco 2 04-25-2004 08:11 AM
PIX 501 user limit and virus/worm affected? Mike W. Cisco 2 04-17-2004 10:08 AM



Advertisments