You can send the client a set of numbers to use (Lease) for transactional
purposes
and they can run through them. They can get new numbers as they need them. Are
these being used to identify connections? If so, then there are a number of
security
holes with your design. The transaction ID's can be modified by a simple client
ID
that is assigned at the server level. That way client's can issue a normal 16
bit ID,
you assign an additional 16 bits based on a client ID and that generates a new
unique
transaction ID. The client doesn't even need to know it's client ID because that
information
is associated with the socket on the server side.
You mention not using ASP, so this should be really easy in a socket based
application.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog:
http://weblogs.asp.net/justin_rogers
"Kamran K" <an******@yahoo.com> wrote in message
news:e6**************@TK2MSFTNGP10.phx.gbl...
Hello
I have created a client server application using C#. Existing
application is using random number on client side to generate sequence
numbers that are then assigned to transactions. This results in
duplicate sequence numbers across multiple users.
Solution to this problem is to generate the sequence number on the
server. Since this is not an ASP app, I cannot use Global.asax
Application object to keep track of begin application.
I would like to do this without hitting the database or use file system
to store and read numbers.
I would appreciate if anyone can help me with creating a sequence number
generator that would not result in duplicate numbers across multiple
users.
Thank You
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!