By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,270 Members | 1,582 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,270 IT Pros & Developers. It's quick & easy.

IsolatedStorageFile Question

P: n/a
Dear All,

I would like to store the registration info of a user of my software. Every
time my program start, I will check form the IsolatedStorageFile whether the
software is registered. If not, the software can just work for 30 trial days
and become unusable.

However, I found that my program will read different IsolatedStorageFile
when the .exe program is placed in different folder. Therefore, when the
software is expired, the user can copy the .exe to another folder and a new
trial period starts.

Is it possible to let my program to read the same IsolatedStorageFile no
matter where the .exe is placed and who is logged in?

Below is the way I create and read my IsolatedStorageFile:

Dim isoStore As IsolatedStorageFile
isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope. Assembly Or
IsolatedStorageScope.User, Nothing, Nothing)

'read the IsolatedStorageFile
Dim reader As StreamReader
reader = New StreamReader(New IsolatedStorageFileStream("reg_info.secret",
FileMode.Open, isoStore))

Do you have any hints for me on this?

Thanks,
Jason


Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jason,

Please do not multipost, why not crosspost sending one message to more
newsgroups in one.

Cor
Jul 21 '05 #2

P: n/a
> However, I found that my program will read different IsolatedStorageFile
when the .exe program is placed in different folder. Therefore, when the
software is expired, the user can copy the .exe to another folder and a new trial period starts.


I have not heard of that behavior, but will check. I know if different user
and/or different assembly (i.e. version) will use different ISO store
depending on options you set for ISO store.

IMO, I would bother with ISO for storing this info. On the one hand, it is
convient because it is out of the way, on the other hand it is a pain as it
is out of the way. It is not a security barrier as you can easily get to
the store as a user. I would keep the license file with the exe (same dir).
I think this allows better support and is easier to diag stuff. Things like
"is the file there?", "what does it contain?, etc. These are easy when you
keep the file seperate in same dir in plain text (e.g. xml). If using ISO,
you need to come up with special programs or long doco to fix or debug
issues.

--
William Stacey, MVP
http://mvp.support.microsoft.com
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.