ASP.NET configuration file processing ignores the codebase hints that appear in the Machine.config file (812832)



The information in this article applies to:

  • Microsoft .NET Framework 1.0
  • Microsoft Visual Studio .NET (2002), Professional Edition SP1
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition SP1
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition SP1
  • Microsoft Visual Studio .NET (2002), Academic Edition
  • Microsoft ASP.NET (included with the .NET Framework) 1.0

SYMPTOMS

Assembly binding specifies information for an assembly. The information for each assembly appears in a dependentAssembly element. The assemblyIdentity element contains information that identifies an assembly.

You can have more than one dependentAssembly element in the configuration file. However, you must have exactly one assemblyIdentity element in each dependentAssembly element. To bind an assembly, you must specify the string "urn:schemas-microsoft-com:asm.v1" with the xmlns attribute in the assemblyBinding tag.

CAUSE

This problem occurs during ASP.NET configuration file processing.

ASP.NET configuration file processing searches the Machine.config file for codebase hints for strongly-named assemblies. If no codebase hint for the assembly appears in the Machine.config file, ASP.NET configuration file processing uses its typical logic.

Codebase hints should work correctly regardless of whether a binding redirect for the assembly appears in the Machine.config file. However, because of a bug, ASP.NET configuration file processing ignores these codebase hints if the binding redirect is missing. For example, when you use the following configuration settings in a Machine.config file, ASP.NET configuration file processing ignores the codebase hint section:
    <configSections>
       <runtime>
        		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        			<dependentAssembly>
        				<assemblyIdentity name="Hello" publicKeyToken="d0e341ccaeb444f7" culture="neutral"/>
        				<codeBase version="1.0.3300.0" href="file://c:/inetpub/Hello.dll"/>
        			</dependentAssembly> 
        		</assemblyBinding>
	</runtime>

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next .NET Framework 1.0 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version       Size     File name
   -----------------------------------------------------
   01-May-2003  12:32  1.0.3705.398  221,184  Fusion.dll

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Codebase hints for assemblies are permitted in the Machine.config file. However, codebase hint are only honored if a binding redirect for the assembly also appears in the Machine.config file.

Modification Type:MinorLast Reviewed:10/11/2005
Keywords:kbHotfixServer kbQFE kbvs2002sp1sweep kbNetFrame100preSP3fix kbfix kbRepair kbSample kbQFE kbBug KB812832 kbAudDeveloper