|
> I have a usercontrol that I am trying to use as an ActiveX Control on a WebPage, however it refereneces an Assembly that whenever the first call is made to anything in the Assembly a Security Exception is throw. I am having a lot of trouble debugging this, because I cannot catch the exception in my code.
Make sure the assembly has the following attribute:
[assembly: AllowPartiallyTrustedCallers()]
Maybe I am not appoaching this the right way. What is the "right" way to debug a .NET ActiveX control on a webpage?
If you mean a Windows Form control hosted inside IE, what you need to do is
run IE, then run VS and Debug-Attach to Iexplorer.exe.
Prior to running IE you may want to clear your downloaded Cache to make sure
you are debugging the same version that is running, to do this do:
gacutil /cdl
Other than this, you just have to make sure you don't make calls to any API
that requires a special permission not available in the Internet Zone, what
I do a lot is I change my settings to allow Full-Trust in my Local Intranet,
then once I have it working, I lower the permissions, this way I can test
locally.
--
Francisco Padron www.chartfx.com
"Neo" <ts******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...I have a usercontrol that I am trying to use as an ActiveX Control on a WebPage, however it refereneces an Assembly that whenever the first call is made to anything in the Assembly a Security Exception is throw. I am having a lot of trouble debugging this, because I cannot catch the exception in my code.
However if I could run the control under the Internet Zone Security settings I could probably find this easily. Does anyone know how to do this? (The control runs fine in the ActiveX container)
Maybe I am not appoaching this the right way. What is the "right" way to debug a .NET ActiveX control on a webpage?
Thanks in advance | |