On the ASP.NET platform, it's not uncommon to use a third-party assembly to make features accessible from your code that you find useful, but that may not be available from the .NET framework. To do this, you deploy the module in the Bin directory, which is the reserved location in your application directory for assemblies; following this, you would update your Web.config to load this module for use on your website. This is commonly known as bin deploying an assembly or binary deployment.
Please follow the guide below to learn how to bin deploy a module for use.
Contents |
To get started, you first have to obtain the assembly you want to bin deploy. In this example we'll bin deploy UrlRewriter.NET, a URL rewriter for ASP.NET applications that do not have the URL Rewrite Module installed.






To make use of the assembly from your website code, the module must be located in the Bin directory on your FTP, which is the standard location for bin deploying assemblies. Following the example above, to bin deploy Intelligencia.UrlRewriter.dll you should connect to your website's FTP server and upload the DLL to this directory:
/www.example.com/web/content/Bin
...where www.example.com is your website name.
Some assemblies require different definitions in the Web.config to work properly; the best way to learn how to load an assembly is to consult the vendor's website. In this instance we are bin deploying Intelligencia.UrlRewriter.dll, so we consulted their website and found this help document explaining the configuration. Using this information, you could load the UrlRewriter.NET module using the following example Web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</httpModules>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
</configuration>
Due to the vast amount of assemblies that can be bin deployed, it's impossible to cover usage of them in this simple article. As with loading the assembly, the best way to learn how to use an assembly is to consult the vendor's website. To learn how to use the Intelligencia.UrlRewriter.dll used in this example, please see this article on URL rewriting in ASP/.NET.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

0 Comments
Add new comment