Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Licence file location

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
johnd



Joined: 11 Jun 2005
Posts: 3
Location: Cambridge UK

PostPosted: Fri Nov 03, 2006 11:31 am    Post subject: Licence file location Reply with quote

I've been lazy and looking back at an app coded a few months back, I don't seem to have explicitly set a location for the ILS licence file at all. Presumably ILS just gives the licence a default name (ProgramName.CheckLicence.lic) and location (the program's installation folder) under these circumstances?

With Vista release imminent and the associated problems that might bring with User Access Control, I think I should set the licence location explicitly. So I think I need to add a declaration to my ILS-using class (VB2005):

Const LICENSE_FILE as string = System.Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) & "MyApp.lic"

('CommonApplicationData' so that all users can see the licence file. There'll typically only be one user, but just to be sure...)

Could you confirm/comment on whether this seems OK please?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Nov 03, 2006 9:43 pm    Post subject: Reply with quote

Yes that is the right approach. You could also consider creating a folder with your company name/product under the common data directory so that if you end up storing more data there you don't litter the root directory with lots of files.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
johnd



Joined: 11 Jun 2005
Posts: 3
Location: Cambridge UK

PostPosted: Sun Nov 05, 2006 1:29 pm    Post subject: Reply with quote

Hmm, this doesn't seem to work in practice because of an assignment problem. Trying to assign the LICENSE_FILE constant as above gives me a 'constant expression required' error, presumably because .Net doesn't consider the System.Environment.etc values as constant, which I guess in one important sense they're not even though the value will be constant for any given user or Windows installation.

For this approach to work it would seem that license_file needs to be a string variable and not a constant. Perhaps the example code for ILS could be updated to reflect this - this issue (ie where the license file is stored) is presumably going to become more important in future under Vista.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Nov 05, 2006 9:59 pm    Post subject: Reply with quote

Sorry - I should have looked more carefully. You indeed cannot use a constant. We will consider changing the sample project to illustrate storing the data in the common application data directory as above.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group