Re: Resource Files

From: Richard Grimes [MVP] (read)
Date: 01/01/05


Date: Sat, 1 Jan 2005 21:42:37 -0000

Steven Cheng[MSFT] wrote:
> Hi Platinumbay,
>
> Thanks for your posting. As for the embeded resource in a .net
> assembly, they're part of the assembly's binary file so we can't
> manually modify them without recompiling the whole assembly. If there
> is some resources that we need to change frequently, it is recommend
> that we put them in a separate assembly file which only contains
> resources so that we can only recompile that assembly when changing
> some resources in it. Thanks.

In addition, if the assembly that links the resource file is strong named it
means that you cannot change the external resource file. The reason is that
when you link a resource file a hash of the resource file is added to the
assembly's manifest. If the assembly is strong named then a hash is created
of the assembly (including all resources and hashes of external - linked -
resources) and this is signed with the private key. The signed hash and the
public key are stored in the assembly. When the assembly is loaded the
loader creates a hash, then it decrypted the signed hahs with the public key
and compares the two hashes. If the two are not the same then it means that
the assembly has changed and so the assembly is not loaded. Thus if you
change the external resource, it means that its hash is not the same, and so
the hash of the assembly is different. This is by design.

Richard

-- 
www.richardgrimes.com
my email evpuneqt@zicf.bet is encrypted with ROT13 (www.rot13.org)


Relevant Pages

  • Re: SEPPUCLU bugcheck introducing new cluster node
    ... and how it's used for resource lookup. ... the RSB are hashed to provide a 32-bit hash value (16 bits prior to ... The hash value is store is the RSB - resource block. ... The hash chain is searched sequentially and each RSB found is checked ...
    (comp.os.vms)
  • Strong Name hash verification and linkresource
    ... The assembly loader does NOT appear to verify the hash of that linked resource image. ... However, if I change the image file, or hide it, the assembly loads and does ...
    (microsoft.public.dotnet.security)
  • Re: SEPPUCLU bugcheck introducing new cluster node
    ... lets first rule out the suspicion regarding LOCKIDTBL being too small. ... There was a known problem in V7.2-1 causing a LOCKMGRERR crash at ... OpenVMS takens to locate the resource after receiving the ... It uses the HASH value to locate the hash chain in the ...
    (comp.os.vms)
  • Re: SEPPUCLU bugcheck introducing new cluster node
    ... No, it's not a system service code, but a sequential error number for ... the identification of these LOCKMGRERR/SEPPUCLU errors. ... that the hash did not match. ... to remove an existing root resource. ...
    (comp.os.vms)
  • Re: URGENT: window.open does not render server-side code when aspx file pulled from a resource f
    ... From a resource point of view this is just some ... System.Net.WebClient to call the page and then return the resulting HTML ... I have an aspx file stored in a resource file. ... How do I get this to render the C# code properly? ...
    (microsoft.public.dotnet.framework.aspnet)