Restricted access to a form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have requirement where client has to call us to get a key to access a
particular form. Secondly, I want the code to be valid for a day. Can some
guide me in right direction to implement this requirement? How should I
generate this code, validate it and let the code be active for a day?

Thanks
 
How's this....when a valid code is entered, note the time and date and
write that value to a hidden location, either filesystem or registry or
isolated storage. Whenever access to the form is requested make sure
that the current datetime is within 1 hr of the saved datetime.

A hack at best but it's free :)

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 
And how would that valid code is generated? What would be the algorithm? Any
clues would helpful.
 
Well the simplest would be to use the date itself as a code, thus any
valid date would also be a valid code

Eg: Valid codes -> 12122004, Invalid Code 23239134

You can also use some kind of random numbers between the various parts
of the date to make it more secure for e.g. 12/12/2004 can be encoded as

XXX12XX12XXXX2004 where the X's are just random digits, you can use any
combination of such schemes.

But be aware that if the customer gets hold of a .Net Decompiler then it
would be very easy for him to crack this scheme, but in my experience
customers never bother to do that unless they are desperately in need of
your product, in which case they would rather buy the product for
support purposes..

Let me know if you need more help.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 
Thanks for the edification. I have used GUID to create a unique identifier.
When a user accesses the form, a window pops up with this GUID (Handle) and
they are asked to provide a valid key for the Handle. The key is actually
ascii value of each character in the handle with three "-" character in it. I
am writing the Handle, Key and System Date in config file and validating sum
of ascii values in Handle against the sum of key, checking three "-" exists
in the hey and also checking the system date against the date in config file.

How does this scenario sound? There is a problem though, user can change the
system date to the date they got the key and access the form. Is there anyway
of stopping this? Is there anyway for writing current date in the registry,
every time window (o/s) starts on user computer? This way, every time user
tries to access the form, I can check the date in the registry against the
system date. Also, how can I jiggle characters in a string?

Thanks
 
Back
Top