I want to use C # to do a program, enabling prompt trial period, after a trial period prompted to register.
thank.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 24, 2013, 1:26 PM
The first time the application is run this creates and stores the expiry date in a file and, then checks the expiry date against the current date each subsequent time the application is run.
However, you can't just store this file in (say) the application folder because, if you did, the user could simply delete it and restart the trial period. You need to bury it in the file system so that it will be difficult for an ordinary user to find it and the following approach uses 'isolated storage' to achieve that aim:
It will be more secure if you give your assembly a strong name and store it in the GAC. Otherwise, it will be identified by its file path and the user will then be able to defeat the trial period by either renaming or copying it to a different location which will cause the isolated storage to be reset.
However, all limited trial applications which depend on the system clock can be defeated by the user temporarily changing the system date. You can prevent this by obtaining the date from the internet, using a web service or otherwise, but this obviously requires that the user has an internet connection which can cause a number of problems in itself.
A better idea IMO is to restrict the number of times the application can be run without any time restriction. You can then simply update the count in the file on each running.
Vengat YadvePosted Sep 14, 2016, 3:27 AM
Ken HPosted Aug 26, 2013, 9:46 PM
thanks.
VulpesPosted Aug 26, 2013, 6:26 AM
To check whether the isolated storage file already exists, try replacing this line:
Ken HPosted Aug 25, 2013, 9:41 PM
if (!isf.FileExists("expiry.txt")) //System.IO.IsolatedStorage.IsolatedStorageFile not include "FileExists" define
Nitesh KejriwalPosted Aug 24, 2013, 11:54 PM
Ken HPosted Aug 24, 2013, 3:16 AM
I just need a simple example Oh. For example, I wanted to be valid for 30 days to write to a binary file, every time you start the program determines whether the current date is greater than 30 days, if more than 30 days then it prompts the user and exit. :)
thank.
Sanjeeb LenkaPosted Aug 22, 2013, 12:26 AM
refer to this link
http://www.c-sharpcorner.com/uploadfile/tanmayit08/make-your-application-with-trial-version/
http://www.codeproject.com/Articles/15496/Application-Trial-Maker
Jignesh TrivediPosted Aug 21, 2013, 11:51 PM
hi,
Please refer our Recommended solution. it might help you.
http://www.c-sharpcorner.com/uploadfile/tanmayit08/make-combination-of-keys-for-our-trial-version-application/
http://msdn.microsoft.com/en-us/library/windows/apps/hh694065.aspx