Config file doesnt work when hosting control in IE as an ActiveX control from file system

R

ryanyoder

I want to install my user control in the GAC, regasm it and run it in a

browser without pulling the control from a web URL.
This is possible and explained in the MSDN KB article 305624
http://support.microsoft.com/d­efault.aspx?scid=kb;en-us;Q305­624


I tried this and it works fine except it doesnt load my configuration
file.
It seems that the <link rel="Configuration" .../> element is ignored
when the object is loaded this way.


I really need a way to load this config file and to run the control on
the machine. We use the config file for tracing config and WSE config.



The control needs to be on the machine so that I can guarantee that it
runs in full trust mode.
 
R

ryanyoder

I see this same question was posted in windowsforms.controls last year
and had no answer.
I have done some more testing with this and I see that hosting a
control with the object tag two different ways results in two different
appDomains.

The first object tag here results in the control being created in the
app domain named "DefaultDomain" and having a
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile of
IEXPLORE.EXE.config

<OBJECT ID="ocxCtl" height="10%" width="10%"
CLASSID="CLSID:A340F2CC-4618-326D-A381-2342733091AF"
CODEBASE="TestControlLibrary.dll#-1,-1,-1,-1">

This second object tag is in the app domain named "localhost" and has
whatever config file I specify with the <link rel="Configuration" tag.

<object id="emptyControl" name="emptyControl" height="10%" width="10%"
classid="http://localhost/viewerhost/TestControlLibrary.dll#TestControlLibrary.TestControl"
VIEWASTEXT>

I don't know if there is any way to get that first object tag to load
my config file. I need that config file for WSE to work correctly.
 

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