RE: Publisher Policy not working in .NET 1.1

From: gimpy (gimpy_at_discussions.microsoft.com)
Date: 09/21/04


Date: Mon, 20 Sep 2004 17:05:03 -0700

As far as I could tell there was nothing wrong with the config. I was in the
original post but I also included it below.
FYI I tried several different variants of the version number with the same
result.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="MyAssembly"
publicKeyToken="133297ceedec1c0d" culture="nuetral" />
        
        <bindingRedirect oldVersion="1.0.0.0 - 65535.65535.65535.65535"
newVersion="1.1.0.0" />
      </dependentAssembly>
      </assemblyBinding>
  </runtime>
</configuration>

"Richard Blewett [DevelopMentor]" wrote:

> It suggests to me that the config file that you created to generate your publisher policy is incorrect. If it has syntax issues it will be ignored (rather than report an error). Or you may have got the oldVersion wrong
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://staff.develop.com/richardb/weblog
> ?
> nntp://news.microsoft.com/microsoft.public.dotnet.framework/
> I have a .NET 1.0 component in the GAC that I want to re-compile with .NET 1.1 so that I can use it on machines that have only the 1.1 runtime. So I compiled in 1.1 with a new version number and created a publisher policy assembly which I also added to the GAC as policy.1.0.MyAssembly. I remove the old assembly and add the new assembly and policy to the GAC.
>
> But when I run the ASP.NET application compiled for the old component, it says assembly not found even though it also says the Publisher policy file is found. Does this mean publisher policy files are broken in .NET 1.1? If I go into the Framework Configuration MMC and configure the assembly it works fine. Anyone have any suggestions?
>
> Here is what the log shows on the error:
> === Pre-bind state information ===
> LOG: DisplayName = MyAssembly, Version=1.0.1027.19127, Culture=neutral, PublicKeyToken=133297ceedec1c0d
> (Fully-specified)
> LOG: Appbase = file:///c:/inetpub/wwwroot/MyApp
> LOG: Initial PrivatePath = bin
> Calling assembly : (Unknown).
> ===
>
> LOG: Publisher policy file is found at C:\WINDOWS\assembly\GAC\policy.1.0.MyAssembly\1.1.0.0__133297ceedec1c0d\policy.1.0.MyAssembly.config.
> LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
> LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
> LOG: Post-policy reference: MyAssembly, Version=1.0.1027.19127, Culture=neutral, PublicKeyToken=133297ceedec1c0d
> LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/custtraxii/d69cd8e8/47ae0587/MyAssembly.DLL.
> LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/custtraxii/d69cd8e8/47ae0587/MyAssembly/MyAssembly.DLL.
> LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CustTraxII/bin/MyAssembly.DLL.
> LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CustTraxII/bin/MyAssembly/MyAssembly.DLL.
> LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/custtraxii/d69cd8e8/47ae0587/MyAssembly.EXE.
> LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/custtraxii/d69cd8e8/47ae0587/MyAssembly/MyAssembly.EXE.
> LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CustTraxII/bin/MyAssembly.EXE.
> LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CustTraxII/bin/MyAssembly/MyAssembly.EXE.
>
>
>
> Here is the policy file:
>
>
>
>
>
>
>
>
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004
>
> [microsoft.public.dotnet.framework]
>
>