DLL Hell and Version Policy
page 7 of 10
by Anuj Sahu
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 45308/ 122

Different level of version policy

There are three levels at which version policy can be applied in .NET: application-specific policy, publisher policy and machine-wide policy.

Application-specific Policy

Each application has an optional configuration file that can specify the application’s desire to bind to a different version of a dependent assembly. The name of the configuration file varies based on the application type. For executable files, the name of the configuration file is the name of the executable + a ".config" extension. For example, the configuration file for "app1.exe" would be "app1.exe.config." Configuration files for ASP.NET applications are always "web.config."

Example 5

An application APP1 was developed with .NET Framework 1.1 and now we want to direct the application to start with .NET Framework 2.0. This means then, a XML file with the following codes and name of that file must be app1.exe.config must be placed in the exact directory where app1.exe is present and now APP1 will be redirected to .Net 2.0 when the application starts.

Listing 3

<configuration> 
    <startup> 
       <supportedRuntime version="v2.0.50727"/>
       <supportedRuntime version="v1.1.4322"/>
    </startup> 
 </configuration>

Publisher Policy

While application-specific policy is set either by the application developer or administrator, publisher policy is set by the vendor of the shared assembly. We have already discussed this.

Machine-wide Policy

The final policy level is machine-wide policy (sometimes referred to as Administrator policy). Policy statements made in machine.config affect all applications running on the machine. Machine-wide policy is used by Administrators to force all applications on a given machine to use a particular version of an assembly.


View Entire Article

User Comments

Title: Chirag   
Name: Chirag
Date: 2007-02-19 6:47:21 AM
Comment:
Really Nice article.

You can find another vay of assembly binding at,

http://chiragrdarji.blogspot.com
http://chiragrdarji.wordpress.com
Title: GOOD   
Name: SHAKTI PRASAD SAHOO
Date: 2007-01-07 8:48:54 AM
Comment:
IT IS A GOOD TOPIC.
Title: Nice   
Name: Joydip
Date: 2007-01-05 4:56:14 AM
Comment:
Hi,

This is a nice article. The concepts are well explained. Good work. Keep it up. Please find my blog at:--

http://aspadvice.com/blogs/joydip/

-Joydip

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-12-05 6:04:03 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search