How to Bin Deploy ASP.NET Assemblies on Shared Servers

On ASP.NET platform it is quite common to use 3rd party assemblies like MVC, MS chart controls to add features accessible from your code which are not present in the .NET framework by default.

In your development machine, you do this by installing the required assembly server-wide. Assemblies get installed in Global Assembly Cache (GAC) and all you need to do is to reference that in web.config file.

However, it may not be possible to install all these 3rd party assemblies in a shared server as different users might be using different versions of the same assembly.

Here comes the power of .NET framework which allows the assemblies to be deployed “locally”. The .NET framework first checks the bin folder for any assemblies before it checks the GAC. Deploying the assemblies involves the steps mentioned below:

1. Obtain the assemblies

If you have installed the assemblies in your development machine, you will find it there. Or, you can download it from the respective vendor’s site, say assume it is a MS chart control or new version of URL rewrite module, download the source and binaries, extract it to your development machine and locate the .dll file(s)

2. Upload the assembly

Create a bin folder outside of your application folder (if you are deploying your application to the root of the site, create a bin folder outside wwwroot folder) and upload the dll you extracted in #1.

3. Load the assembly in your application

This is the most important part and I would recommend having a .NET developer configure this as some assemblies require different definitions in the web.config file. A sample one looks like the one mentioned below:


<section name=”MODULE”

<add name=”MODULE” type=”MODULE_TYPE, DLL_NAME” />

<modules runAllManagedModulesForAllRequests=”true”>
<add name=”MODULE” type=”MODULE_TYPE” />
<validation validateIntegratedModeConfiguration=”false” />


That will be all! Wasn’t that easy? Start using your bin deployed assembly in your website. Also note that .NET is full trust by default in our servers which will allow you to load any assembly that needs full trust as well from bin folder.

Looking for quality ASP.NET Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under DotNet/Windows Hosting, Windows Server Admin | RSS 2.0

7 Comments on How to Bin Deploy ASP.NET Assemblies on Shared Servers

  1. Bob Anderson says:

    Very helpful Blog . Do you have any actual examples for Changing the web.config file

  2. Tommy English says:

    What do you use for the module type for dlls? I’m trying to edit the web.config but I get errors on the module type.

    • Noah S says:

      Hi, The module type is the Fully Qualified Class Name (Namespace.Classname), followed by the Assembly name. So if you’re using a provided .Net extension located in the Extensions Assembly (like IISRewrite), the module is in the System Namespace and Web Class. So the module type is System.Web.Extensions.

  3. Flavio says:

    Can you show a example with the configuration?For example, use this Microsoft.Web.Helpers dll.

Leave a Reply

Your email address will not be published. Required fields are marked *