• Decrease Text SizeIncrease Text Size

Bin Folder & My Modules

Bin Folder & My Modules

The easiest way to add your own assemblies to the Bin folder is to add them to the Development site and prefix the .dll files names with "my_". This way they behave like all My Module files, and are not removed by the Centralpoint update installation.  Admin > Properties > Sync Exclusions is another option the .dll file is only used in the web site's root folder.  Adding a file to this attribute will prevent it's deletion when the site is sync'd.  However, we are aware that there are times when you cannot control the name of the .dll file or exclude it from the sync so we have outlined some alternatives below.

If you cannot rename the .dll file you can place it in a folder that is prefixed with "my_", like "Bin/my_Bin/YourAssembly.dll". This folder will behave like any other My Module code during the sync and update process, but your assembly will not automatically be recognized by ASP.NET. Next, you must add a configuration/runtime/assemblyBinding/probing element to the web.config file of each site that contains the my_Bin folder as follows.

<runtime>
	<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
		<probing privatePath="bin;bin\my_Bin" />
	</assemblyBinding>
</runtime>
Alternatively, custom assemblies can also be installed in the Global Assembly Cache (GAC). The assemblies installed in the GAC will be accessible to all applications on the computer. In this case, the computer is the web server, and the assemblies will be accessible to all web sites on the computer. These assemblies will not be removed by Centralpoint because the GAC is not affected by the sync or update processes.

Finally, you need to register your assembly so that it is recognized by the ASP.NET application. This can be done in the individual ASPX/ASCX files (<%@ assembly name="YourAssembly" %>) or within the configuration/system.web/compilation/assemblies element of the web.config file of each web site that will utilize the assembly (<add assembly="YourAssembly" />). These files will not be overwritten by the Centralpoint because custom ASPX/ASCX files should be development within My Modules protecting them from the update/sync process, and web.config files are excluded from the sync.