License Class and .NET

M

Matt Retzer

Hello all -

I've written some custom controls using VS.NET 2003 and .NET 1.1 - I've been
trying to get the licensing to work in the control using the examples at
http://windowsforms.net/articles/Licensing.aspx - for some reason though a
continually get exceptions from the validate method of the LicenseManager
class whenever I try to use the control in another project in my solution.

I've basically setup two projects in a solution - a custom user control
project and a windows form project for testing the control. The code to use
the licenses classes is simple enough, and I think I am creating the .LIC
file correctly in the custom control project - but I always get an
System.ComponentModel.LicenseException whenever I try to use the custom
control - also the licenses.licx never gets created (I think it is supposed
to be created when I drop the control onto the form in the designer).

Any tips on what I am doing wrong - I'm almost sure I've got everything, but
documentation on what to do "outside" the classes with files needing to be
created seems to be lacking and I can't seem to find a tutorial that covers
everything in a clear manor.

Thank you,

Matt
 
M

Matt Retzer

For everyone's sanity - most of the sources, except the one then Gabriele
was kind enough to point out, tell you to put the .LIC file in the
bin/debug directory. This is NOT correct - the .LIC file needs to go in the
obj/debug directory (or obj/release/). You will need to show all of your
project files to see this directory as it is hidden by default.

Even on Microsoft's own site
(http://windowsforms.net/articles/Licensing.aspx) it is incorrect. I am
using VS2003 and .NET 1.1, I don't know if the path has changed since VS2002
and .NET 1.0 or not.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top