Ask the Expert

How do I create .NET DLLs so code can be accessed from multiple sites on the same server?

How can I create some .NET DLLs so that the code can be accessible from multiple sites on the same server? How do I have to set up/deploy my application/DLLs/config files? Thanks.
A DLL can be simply dropped into a Web application bin folder and it's ready for use. However, if you're developing code that uses that assembly, you must reference it in the VS.NET Web Application project. In order to avoid deploying the assembly to all sites using it, you can instead add the assembly to the Global Assembly Cache (GAC). In order to do so, you need to sign the assembly (see the product documentation on how to do that), and register it, either through the command line or using the .NET Framework Configuration application inside Administrative Tools.

This was first published in November 2003