Connecting Tech Pros Worldwide Forums | Help | Site Map

Why LicenseException? (OT)

Armin Zingler
Guest
 
Posts: n/a
#1: Nov 4 '08
Hi,

this is a kinda OT question, but as I didn't get an answer in a Framework
group, I try it here because it's very urgent.

I've written a managed Dll (in VB 2003) that offers features via COM
interop. I also have a client Exe written in VB6. The Exe calls a method in
the assembly which shows a System.Windows.Forms.Form modally. The Form
contains an ActiveX control. The same control is used by the same Exe in
some of it's (unmanaged) VB6 Forms without a problem.

My problem is, whenever the managed Form is shown, I get a LicenseException
("You do not have a license to use this ActiveX control"). Callstack:

at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at MyForm.InitializeComponent()
at MyForm..ctor()
...

The problem does _not_ occur on the development machine. It's only there on
my customer's machine. He does not have a problem using the VB6 Forms
containing the same control in the same Exe, only whenever the managed Form
is to be shown. Therefore, I think this is not really a license problem.
Must be a problem using such an ActiveX control on a managed Form (thus, I
chose this group) but I have no idea how to solve it.

I read about component authoring and how to create a license for your own
controls, but that's not really the case here.
http://msdn.microsoft.com/en-us/library/fe8b1eh9.aspx
The page says that the licensing model also supports ActiveX controls,
however I don't know what goes wrong here.

Anybody's got a clue what to do?


Armin


Family Tree Mike
Guest
 
Posts: n/a
#2: Nov 4 '08

re: Why LicenseException? (OT)


I had a very similar problem with the MSChart control. There was some
registry setting that got arround the issue. If it is this control I can
try and dig up the solution.

"Armin Zingler" <az.nospam@freenet.dewrote in message
news:ur$XndsPJHA.4708@TK2MSFTNGP06.phx.gbl...
Quote:
Hi,
>
this is a kinda OT question, but as I didn't get an answer in a Framework
group, I try it here because it's very urgent.
>
I've written a managed Dll (in VB 2003) that offers features via COM
interop. I also have a client Exe written in VB6. The Exe calls a method
in
the assembly which shows a System.Windows.Forms.Form modally. The Form
contains an ActiveX control. The same control is used by the same Exe in
some of it's (unmanaged) VB6 Forms without a problem.
>
My problem is, whenever the managed Form is shown, I get a
LicenseException
("You do not have a license to use this ActiveX control"). Callstack:
>
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at MyForm.InitializeComponent()
at MyForm..ctor()
...
>
The problem does _not_ occur on the development machine. It's only there
on
my customer's machine. He does not have a problem using the VB6 Forms
containing the same control in the same Exe, only whenever the managed
Form
is to be shown. Therefore, I think this is not really a license problem.
Must be a problem using such an ActiveX control on a managed Form (thus, I
chose this group) but I have no idea how to solve it.
>
I read about component authoring and how to create a license for your own
controls, but that's not really the case here.
http://msdn.microsoft.com/en-us/library/fe8b1eh9.aspx
The page says that the licensing model also supports ActiveX controls,
however I don't know what goes wrong here.
>
Anybody's got a clue what to do?
>
>
Armin
>
Armin Zingler
Guest
 
Posts: n/a
#3: Nov 4 '08

re: Why LicenseException? (OT)


"Family Tree Mike" <FamilyTreeMike@ThisOldHouse.comschrieb
Quote:
I had a very similar problem with the MSChart control. There was
some registry setting that got arround the issue. If it is this
control I can try and dig up the solution.

Thanks a lot for your quick answer. Did you also have the problem on your
development machine? Which registry entry was it? I know there's a .reg file
if the old controls are used, but that's only for development usually.
It's the Farpoint Spreadsheet control. I know there's a .Net version but the
AX version still works (on my dev machine and on the unmanaged forms in the
same process on my customer's machine).

Armin ['are-mean]

Family Tree Mike
Guest
 
Posts: n/a
#4: Nov 4 '08

re: Why LicenseException? (OT)


Yes, we had a problem on some development machines too. Simply registering
the OCX didn't fix things. I'll find the link that got us going on that
control. Maybe there is a clue for your situation within it. I'll post
back shortly....


"Armin Zingler" <az.nospam@freenet.dewrote in message
news:e7V3xJtPJHA.4848@TK2MSFTNGP03.phx.gbl...
Quote:
"Family Tree Mike" <FamilyTreeMike@ThisOldHouse.comschrieb
Quote:
>I had a very similar problem with the MSChart control. There was
>some registry setting that got arround the issue. If it is this
>control I can try and dig up the solution.
>
>
Thanks a lot for your quick answer. Did you also have the problem on your
development machine? Which registry entry was it? I know there's a .reg
file
if the old controls are used, but that's only for development usually.
It's the Farpoint Spreadsheet control. I know there's a .Net version but
the
AX version still works (on my dev machine and on the unmanaged forms in
the
same process on my customer's machine).
>
Armin ['are-mean]
>
Family Tree Mike
Guest
 
Posts: n/a
#5: Nov 4 '08

re: Why LicenseException? (OT)


I'm pretty sure this link, method two, was how we got things moving. I hope
this helps somehow as it is not exactly the same situation, but sounds
close.

http://support.microsoft.com/kb/318597/en-us


"Armin Zingler" <az.nospam@freenet.dewrote in message
news:e7V3xJtPJHA.4848@TK2MSFTNGP03.phx.gbl...
Quote:
"Family Tree Mike" <FamilyTreeMike@ThisOldHouse.comschrieb
Quote:
>I had a very similar problem with the MSChart control. There was
>some registry setting that got arround the issue. If it is this
>control I can try and dig up the solution.
>
>
Thanks a lot for your quick answer. Did you also have the problem on your
development machine? Which registry entry was it? I know there's a .reg
file
if the old controls are used, but that's only for development usually.
It's the Farpoint Spreadsheet control. I know there's a .Net version but
the
AX version still works (on my dev machine and on the unmanaged forms in
the
same process on my customer's machine).
>
Armin ['are-mean]
>
Armin Zingler
Guest
 
Posts: n/a
#6: Nov 6 '08

re: Why LicenseException? (OT)


"Family Tree Mike" <FamilyTreeMike@ThisOldHouse.comschrieb
Quote:
I'm pretty sure this link, method two, was how we got things moving. I
hope this helps somehow as it is not exactly the same situation, but
sounds close.
>
http://support.microsoft.com/kb/318597/en-us
Thanks, Mike, I knew this one already. Unfortunatelly I can not transfer
this knowledge to my case. However, thanks for the pointer.


Armin

Closed Thread


Similar Visual Basic .NET bytes