.NET Forum / Windows Forms / WinForm Controls / November 2004
Licx File Regeneration
|
|
Thread rating:  |
for the 95% of the people who seem to have the inane ability of carrying out computer tasks that we know operate a specific way and mysteriously they get wierd results (namely because they usually do not under stand how to follow instructions) I need to know if there is a way to dump the old licx file and force a regneration/recompilation. Normally this is mandatorily forced by removing the bin/obj files, reopening the project, making a change to the form (namely readding a control that uses lics - although some state that all you have todo is set a property) and then rebuilding the solution.
"Jeffrey Tan[MSFT]" - 03 Nov 2004 09:56 GMT Hi John,
Thanks for your posting!
Can you explain the problem more detailed? What does the "old licx file" point to? What does "dump the old licx file" mean? And does this has any relation with the .Net Winform?
I will wait for your further feedback. Thanks
Best regards, Jeffrey Tan Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Allen Anderson - 04 Nov 2004 00:23 GMT the problem is that when people have the trial version of the control and compile their projects, a license.licx file is created and baked into their files. However, when someone purchases the real license and goes to run the control, how do you force the old license.licx to go away and the new one be regenerated. So when they go to instance the control, if the license is currently a trial license (we can tell that) then in the constructor we would like to always check the registry for the valid license key and if there is one after they purchase it then it should force the licx to regenerate.
And yes, this is all .net winforms stuff for .net based controls.
>Hi John, > [quoted text clipped - 11 lines] >Get Secure! - www.microsoft.com/security >This posting is provided "as is" with no warranties and confers no rights. "Jeffrey Tan[MSFT]" - 04 Nov 2004 09:54 GMT Hi Allen,
For this issue, we will do some research on it and reply to you ASAP. Thanks for your understanding.
Best regards, Jeffrey Tan Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Allen Anderson - 05 Nov 2004 00:52 GMT thanks Jeff, we will await your answer.
>Hi Allen, > [quoted text clipped - 6 lines] >Get Secure! - www.microsoft.com/security >This posting is provided "as is" with no warranties and confers no rights. [quote] for the 95% of the people who seem to have the inane ability of carrying out computer tasks that we know operate a specific way and mysteriously they get wierd results (namely because they usually do not under stand how to follow instructions)[/quote]
When storing license information for licensed Control's the information is stored in the compiled assembly. The Dilemma is if the user is using a Trial Version and then upgrades to a Retail and installs it and recompile's his project VS.NET seems to cache the prior stuff compiled and inserted in with licx. The workaround for this is to close down VS.NET, delete the bin/obj directories and the licx file. Reopen the project and play around with a property on the form or drop another licensed control (this is to regenerate the licx file). Then rebuild the solution. It then takes the Retail key and does its magic with the LicxProvider and puts that key in with the Assembly. The dillemma is that there are people who are incapable of following a simple set of instructions through and thus end up withthe trial license when they have the retail. The solution needed is a work around VS.NET continuously insisting on caching. I hope my problem and request were clear enough.
I posted posted here in microsoft.public.dotnet.framework.windowsforms.controls because it seemed to be the most relevant newsgroup.
> Hi John, > [quoted text clipped - 11 lines] > Get Secure! - www.microsoft.com/security > This posting is provided "as is" with no warranties and confers no rights. "Jeffrey Tan[MSFT]" - 08 Nov 2004 02:00 GMT Hi John,
Sorry for letting you wait for so long.
Currently, we are finding some experienced people to handle for this issue. We will update you ASAP. Thanks for your understanding.
Best regards, Jeffrey Tan Microsoft Online Partner Support
 Signature Get Secure! - www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Allen Anderson - 13 Nov 2004 19:13 GMT we are still waiting for an answer on this. Have you been able to find anything out yet?
thanks
>Hi John, > [quoted text clipped - 8 lines] >Get Secure! - www.microsoft.com/security >This posting is provided "as is" with no warranties and confers no rights. Yan-Hong Huang[MSFT] - 16 Nov 2004 02:03 GMT Hello,
Sorry for the late respnose. We are still performing research on it. Currently we are sending email to our internal supporting group to see whether there is any way around it. We will get back here as soon as possible.
Thanks very much for your patience.
Best regards, Yanhong Huang Microsoft Community Support
Get Secure! ?C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! -http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as p&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Yan-Hong Huang[MSFT] - 18 Nov 2004 06:00 GMT Hello All,
For those who are still monitoring this issue. I post the answer from our support team here:
----------- You really don't want the control hosted in the design environment to force a rebuild, that's really squirelly. The build/rebuild operation should ONLY come from the user/developer. I don't completely understand the issue here though. Presumably, the user installs a trial version that is also licensed, and then upgrades, and they want the programs that use the trial version of the control to automagically be updated to use the full version? I don't think that's a supported scenario. At a minimum the developer would have to remove the trial version of the control from the application, add in the new control, and rebuild. Or are they implementing some sort of control that supports multiple licenses? One that allows for using a single control that supports a subset of functions unless the full license is installed? That scenario is probably a bit more complex than the standard licensing scheme provided by .NET. Best to check up on this and see if there's a way to customize the licensing scenario. -------------
Thanks very much.
Best regards, Yanhong Huang Microsoft Community Support
Get Secure! ?C www.microsoft.com/security Register to Access MSDN Managed Newsgroups! -http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as p&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
Allen Anderson - 27 Nov 2004 16:23 GMT The thing that concerns me about what you are saying is that you are saying something that we have already figured out how to do isn't possible. Did you get your information from the development team???
all we were trying to figure out was how to make the license file store the new license data on a REBUILD without having to change a property or delete and redrop the control onto the form. We figured out how to do this as John explained earlier.
>Hello All, > [quoted text clipped - 34 lines] > >This posting is provided "AS IS" with no warranties, and confers no rights. Felix Deschamps - 10 Nov 2004 22:58 GMT John,
I apologize for the delay in getting back to you. My name if Felix Deschamps, and I am a member of the Visual C++ and C# support group. I have a couple of additional quesitons for you regarding your setup:
1. Are you using LicFileLicenseProvider or are you using a custom Provider? 2. Are you using the License Compiler (Lc.exe) to add a licensed file? 3. What are they updating when they get the full version? Just a Reg key or are they getting a new file.
If they are updating the registry 1. Does a "Rebuild All" work for updating? 2. Is this a design time or runtime license that they are updating?
I look forward to hearing your reply.
Felix Deschamps Microsoft Visual C++ & C# Support Professional This posting is provided "AS IS" with no warranties, and confers no rights.
#1 -> I am implementing a custom LicFileLicenseProvider
#2 -> Our target audience who are having difficulties are building with VS.NET
#3 -> They are getting a File and a Registry key. In 99.9% cases the File will be the same
#4 -> What "Works" for me is
a) Close the Project down
b) delete the bin and obj Directories
c) Delete the license.licx
d) Reopen the project
e) Make a property change on the form or drop another licensed control on the form (this is to force a regeneration of the license licx file)
f) Do a complete rebuild
g) Everything works because there is no compiled item and VS.NET is forced to recompile and reget the license key.
#5 - We don't do any actual Design Time Validation. The only thing done at Design time is that we grab the serial and stuff it in the assembly.
internal class CompanyNameLicenseProvider : LicFileLicenseProvider
The GetLicense basically (when in Context.designtime) Grabs the Serial from the Registry and then does a context.SetSavedLicenseKey.
the licx file is being generated by Visual Studio .NET.
> John, > [quoted text clipped - 19 lines] > This posting is provided "AS IS" with no warranties, and confers no > rights. Felix Deschamps - 19 Nov 2004 15:43 GMT John,
It seems that automatic regeneration of the licx file is not supported, since we don't have a way to mark the file as "dirty" so it is regenerated. It also appears that the default licensing method (using LicFileLicenseProvider) does not readily support upgrading the existing control automatically to a new version in the way you describe. I can only recommend two possible solutions:
1. Display some kind of dialog if you detect the they have just upgraded, pointing them to the instructions. or 2. Change the licensing scheme to solely use the registry (and not go throug hte hLicFileLicenseProvider), so no caching of the information takes place.
I hope you find this information useful.
Felix Deschamps Microsoft Visual C++ & C# Support Professional This posting is provided "AS IS" with no warranties, and confers no rights.
I do not know about helpful as it is merely a reiteration of what we already knew and have contemplated but the effort is greatly appreciated. Here is what we ended up doing and it sort of works in case anybdoy else is having this problem The Default licxProvider's Validate method caches . We added extra code that checks if the exsting key is a trial key and if it is a trial key then it makes a call to SetLicenseKey regardless which seems to bypass part of the cachingof the Validate response. From what we have seen this requires the user to ONLy have to do a rebuild of the project without going through the hassle of removing the bin/obj
> John, > [quoted text clipped - 19 lines] > This posting is provided "AS IS" with no warranties, and confers no > rights.
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|