How to use application configuration file?

M

mqsash

Hi,
How do I use a configuration file with <codebase> to
deploy a C# assembly as a cab file (in an html) ?

The config file has the <codebase> element which points to
the proper cab file. The html page and the cab file are in
the same location.
But upon invoking the html page nothing happens.
Even the FusLogvw.exe does not register anything.
Any help will be much appreciated.

The complete assembly is as simple as this
using System;
using System.Windows.Forms;
namespace testAssemblyNS
{
public class Class1
{
public Class1()
{
MessageBox.Show("ctor");
}
}
}
here is the complete html
<html>
<HEAD>
<Link rel="configuration"
href="http://samir2k/csharp/testAssembly.dll.config"/>
</HEAD>
<body >
<OBJECT ID="myAssembly"
classid="testAssembly.dll#testAssemblyNS.Class1">
</OBJECT>
testAssembly
</body> </html>

here is the config file
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-
com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="testAssembly"/>
<codeBase version="1.0.0.0"
href="http://samir2k/csharp/testAssembly.cab"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

TIA
mqs
 

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