Re: How to configure an assembly using CodeBase ...?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"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.

.



Relevant Pages

  • Re: How to configure an assembly using CodeBase ...?
    ... We are not supposed to hard code to bind to the codebase assembly. ... I am using .NET Framework V 2.0 with Visual Studio ... - Add a BindingRedirect to specify that version 1.0.0.0 needs to be ... The specific structure of the .config file can be found in the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to configure an assembly using CodeBase ...?
    ... We are not supposed to hard code to bind to the codebase assembly. ... - Add a BindingRedirect to specify that version 1.0.0.0 needs to be ... The specific structure of the .config file can be found in the ... Configuration Tool to specify the BindingRedirect and the CodeBase, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: possible patch for implementing split DNS
    ... you to specify a different config file ... I want some of this rats nest of processes to use a different name server but not all of them, ... I found it interesting although I haven't had time to give it a try especially since I'm thinking about leaving bind9 for djbdns and ldap2dns even though I've never been crazy about djbdns and family. ...
    (freebsd-net)
  • Re: Latest patch parses 1.1 pages with 2.0
    ... is parsing a config file while everything is reporting that 1.1 is the active framework. ... See below for the instructions to *uninstall* the .Net Framework 2.0 ... Now I could fix the config file to run happily under 2.0, and then copy your identity.aspx file in. ... I don't think you want to have people upload 500GB files to your server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: possible patch for implementing split DNS
    ... to specify a different config file ... I want some of this rats nest of processes to use a different name server but not all of them, ... I would ask the security crew to think about this too as DNS is important to get right for security, ...
    (freebsd-net)