Help Docs Control Panel Guides Cloud Sites Guide ASP.NET and IIS in Cloud Sites ASP.NET Binary Deployment on Cloud Sites

ASP.NET Binary Deployment on Cloud Sites

This article describes how to bin-deploy an assembly. It's common to use a third-party assembly to add features that aren't found within the .NET framework. Learn about binary deployment with ASP.NET on Cloud Sites.

On the ASP.NET platform, it’s common to use a third-party assembly to add useful features to your code that aren’t normally within the .NET framework. This process is commonly known as bin-deploying an assembly, or binary deployment. Third-party assemblies collect all the resources you need to use these extra features. To use a third-party assembly, you deploy the assembly to the Bin directory, which is the reserved location in your application directory for assemblies. Then, you update your web.config file to load this assembly for use on your website. This article describes how to bin-deploy an assembly.

Before you begin, make sure your Cloud Sites website is using IIS and ASP.NET. If you are using a Linux environment, this walkthrough won’t work for you. By default, Cloud Sites uses a modified medium trust configuration. (On ASP.NET 4.0, full trust must be specified through the web.config.) If you are using ASP.NET 3.5 or below, the assembly must allow partially trusted callers to function correctly. If you do not know whether the assembly will work in medium trust, contact the vendor. If you are not sure if your setup meets the assembly’s requirements, feel free to contact the Support team. We’re happy to help.

There are three parts to bin-deploying an assembly:

Every assembly will have a slightly different process. This walkthrough will lay out the general procedure, but it’s important to review the assembly’s website and documentation to find the right files and web.config information.

Download the Assembly Files

Downloading an assembly is very similar to downloading and extracting other compressed files and packages.

  1. Visit the website for the assembly you’ll be installing. This is where you’ll find all the files you need.
  2. Download the binaries and source code from the website. This will be a compressed file. Save this file to your computer.
  3. Extract the assembly file from the compressed folder. This file will have the file extension .dll, which stands for dynamic-link library.

Upload the Assembly

To use the assembly from your website code, the module must be located in the Bin directory on your FTP server, which is the standard location for bin-deploying assemblies. You’ll use an FTP client to upload this file.

  1. Using your preferred FTP client, connect to your website.
  2. Navigate to the Bin directory. If you don’t have a Bin directory, you can create this directory using your FTP client. How you create directories will depend on your FTP client. Create this directory within the /www.mysite.com/web/content directory (of course, you will see your domain name instead).
  3. Upload the assembly file to the directory you just created or entered. The full filepath for this directory will be:
    /www.mysite.com/web/content/Bin

  4. Once you are done uploading the assembly, make sure to close the FTP connection.

Update Your web.config File

The new assembly might need to have definitions added to the web.config file. Adding these definitions tells your Cloud Site to use this new assembly. What you add to the web.config file will depend on the specific assembly. Look at the vendor’s website to learn exactly what to add to enable the assembly.

Enable Full Trust via web.config

Some assemblies require full trust to run properly. You can enable full trust on ASP.NET 4.0 or higher, only. To enable full trust on your .NET site, place this code in the ‘configurationsystem.web’ section of your website web.config file:

<trust level="Full" /

If your website’s web.config file does not have a ‘configurationsystem.web’ section below is an example that includes these sections of the web.config file:

<configuration> 
         <system.web> 
              <trust level="Full" /> 
         </system.web> 
</configuration>
Was this article helpful?