65.9K
CodeProject is changing. Read more.
Home

Mutex Solution in ASP

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.89/5 (8 votes)

Dec 11, 2003

viewsIcon

65261

downloadIcon

646

ASP code for generating unique IDs

Introduction

This article is intended to solve the mutex problem, arising in huge websites, where a lot of information for each session user has to be unique. Here the solution for the  mutex problem is done using the ASP web technology. The same logic can be implemented in other technologies also. In fact this solution can even be implemented in client server applications.

Details

In a huge web application thousands of users log-in, and log-out in a hour from all over the world. Now, we some times need to provide them a unique ID instead of just a sessionID, and this cannot be done using any feature in IIS. Say, if we want to give them a unique ID for a table, then it is difficult to use the application.lock method, and then we need some extra mechanism to generate a unique ID. See Global.asa from the downloadable zip for details on how I have implemented the unique ID generation.

Sample Usage

<%=Application("recordsid")%>

History

  • December 12 2003 - First version