How to download other files when hosting winform control in IE?

How to download other files when hosting winform control in IE?

Post by Lei Jian » Fri, 02 Jul 2004 17:21:48


One of my control need a small resource file not embeded in DLL. When I
build the exe version of my application, I just put the resource file in the
applcation directory where both my EXE and DLL is located, or I embed the
resource file into the EXE. Both works ok.

However, when I depoly the control via IE(host the control in IE), how can I
let the control find the resource file? The control is a third-party control
and it seems it only looks for the startup assembly(e.g. a EXE) to search
the resource file.
 
 
 

How to download other files when hosting winform control in IE?

Post by Paul Quall » Sat, 03 Jul 2004 04:06:20

Lei,

I believe that what you need to do is to put a link tag on the page that
hosts your control, and then describe the resource file in that.

<LINK href="myfile.rcConfig" rel="Configuration">


where your myfile.rcConfig looks something like

----------------------------------

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="myresourcefile.dll"/>
<codebase href="http://myserver/myresourcefile.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

----------------------------------
## note that you can put any other config settings that you would normally
put in your app.config file if you need to initialize any particular things
in your control.

I copied and modified this from an old project that I haven't worked on in
awhile, so it may need some tweaking.

Hope it helps at least get you further,

Paul Qualls





the
I
control