Re: How to configure an assembly using CodeBase ...?
- From: "Alberto Poblacion" <earthling-quitaestoparacontestar@xxxxxxxxxxxxx>
- Date: Wed, 16 Sep 2009 08:46:14 +0200
"Raj" <Raj@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:40A8D803-F463-446E-BCDF-71B26ABE1ADE@xxxxxxxxxxxxxxxx
I am developing an application ... and it has reference to old version of the
assembly. Without recompiling the application how can I make reference to the
latest assembly using codebase? Old version of the assembly is in the local
GAC where the application is running and the latest version of the assembly
is on a remote server. I am using .NET Framework V 2.0 with Visual Studio
Express Edition for C#.
Old version of the assembly is 1.0.0.0 and the new version is 2.0.0.0
You can add a configuration file (myprogram.exe.config), and inside the config file you will need to specify a couple of settings:
- Add a BindingRedirect to specify that version 1.0.0.0 needs to be replaced by version 2.0.0.0.
- Add a CodeBase specifying the path to the 2.0.0.0 version.
The specific structure of the .config file can be found in the documentation, but you don't need to know it. You can use the .Net Framework Configuration Tool to specify the BindingRedirect and the CodeBase, and it will write for you an appropriate .config file.
You will pobably need to adjust the CAS permissions (which can also be done with the .Net Framework Configuration Tool), since the DLL loaded from the server will default to permissions that are much more restrictive than those of the DLL that you had in the GAC.
.
- Follow-Ups:
- References:
- Prev by Date: Re: Excel in web page, How?
- Next by Date: Re: How to configure an assembly using CodeBase ...?
- Previous by thread: Re: How to configure an assembly using CodeBase ...?
- Next by thread: Re: How to configure an assembly using CodeBase ...?
- Index(es):
Relevant Pages
|