Sidebar 2: Accessing .NET Assemblies with Strong Names


Background: At least for proper versioning but sometime also to configure security .NET assemblies are given strong names. In short this is very similiar with a digital signature but serves a different purpose. As soon as a .NET assembly has a strong name using it from other .NET code requires additional work.



Microsoft has decided that .NET assemblies with strong names may only be called from other .NET code if this is fully trusted. Hosting the .NET assembly in some locally started WinForms application will fulfill this requirement normally. Using the .NET assembly with the strong name for example from a browser will fail. This can be resolved by adding an .NET attribute to the .NET assembly itself: [assembly: AllowPartiallyTrustedCallers]. This implies some security issues which have to taken into consideration - please refer to the Microsoft developer documentation for details. Especially the .NET assembly should be protected against misuse - adding the attribute allows any client to execute the code therein.


Back to List of Sidebars

Back to Projects Home Page