Upgrade Servers and Clients
The manual upgrade process in NCache involves several steps to update your existing NCache installation to a newer version. Note that the specific steps and considerations for the manual upgrade process may vary based on the NCache version you are currently using and the version you are upgrading to. Always consult the official NCache documentation or Alachisoft Support Team for the most accurate and up-to-date instructions.
Note
Upgrading NCache requires you to have new license key, which can be provided by Alachisoft Sales Team.
Basic Steps of Upgrading NCache:
- Deactivating older NCache installations.
- Uninstalling NCache from the older machines.
- Installing Newer NCache version on machines.
- Activating NCache Licenses.
- Reconfiguring/Recreating caches with the same configurations in your environment.
- Testing the cache cluster for connectivity and client operations from the client boxes through your application.
Note
Alachisoft collaborates closely with customers to ensure a seamless NCache upgrade process. Customers have the option to manually perform the upgrade steps or utilize PowerShell scripts provided by the Alachisoft Support Team for an automated upgrade.
Upgrading NCache Servers:
To upgrade the NCache Servers, follow the steps detailed below:
Create Backup of config.ncconf (Optional)
If you are upgrading to a major version of NCache, then in order to restore old configurations you need to create a backup of your config.ncconf file. You can use your previously existing caches as templates (config.xml) for your caches in the new version. Template can be created either by yourself or you can contact Alachisoft Support Team to do that for you.
Note
To create a config.xml file you can contact Alachisoft Support Team.
Deactivate Older NCache
You have the option to transfer your licenses between machines using the deactivation process. To deactivate an activated NCache license, you can utilize the Unregister-NCache
PowerShell cmdlet. However, please be aware that license deactivation is not initially enabled; you must get in touch with Alachisoft Sales to do so. Once enabled, you can use your license key to deactivate the activated machines.
The deactivation can be done through two methods:
Important
In older versions of NCache, the deactivation process requires deactivation code. In newer versions of NCache, you can either use License key to deactivate the activated machines, or get in touch with Alachisoft Sales or Alachisoft Support Team to enable deactivation.
Uninstall NCache
Important
Make sure all the previously running NCache processes or any applications using NCache are stopped before proceeding with this step.
Next, you will have to uninstall current version of NCache. If any application is using NCache and you attempt to uninstall NCache, an error message will be displayed.
Install New Version
Install new version of NCache. For complete step by step installation process, see the Installation Guide.
Important
In older versions of NCache, please ensure that the NCache assemblies are fully removed from the GAC directory prior to a new NCache installation.
Activating New NCache Licenses
For complete step by step activation of new NCache license, proceed to Activate NCache License. In order to have new version of license key, get in touch with Alachisoft Sales Team.
The activation can be done through two methods:
Reconfiguring Caches With the Same Configurations
After activating your license, it is best to ensure that you create/configure your caches in the new NCache version based on the template you used beforehand to replicate the exact configurations. You can either do it manually or through NCache Management Centre, or you can use the template you created in the first step to have exact replica of your previous cache.
Run the following command to create a new cache having exact replica of your configurations, with the name demoCache on server 20.200.20.39 having the size of 1024 MB, using the topology specified in the configuration existing on the specified path.
New-Cache -Name demoCache -Server 20.200.20.39 –Path C:\config.xml
Adding your Client Nodes (Optional)
To add Client Nodes into the cluster, follow the steps detailed in our administrator's guide here. Make sure that on your client-side, remote installation is enabled.
Upgrading NCache Clients:
To upgrade the NCache Clients, follow the steps detailed below:
Deactivate Older NCache
You have the option to transfer your licenses between machines using the deactivation process. To deactivate an activated NCache license, you can utilize the Unregister-NCache
PowerShell cmdlet. However, please be aware that license deactivation is not initially enabled; you must get in touch with Alachisoft Sales to do so. Once enabled, you can use your license key to deactivate the activated machines.
The deactivation can be done through two methods:
Uninstall NCache
Important
Make sure all the previously running NCache processes or any applications using NCache are stopped before proceeding with this step.
Next you will have to uninstall current version of NCache. If any application is using NCache and you attempt to uninstall NCache, an error message will be displayed.
Install New Version
Install new version of NCache. For complete step by step installation process see Installation Guide.
Important
In older versions of NCache, prior to NCache installation of NCache, please ensure that the NCache assemblies are fully removed from the GAC directory.
Activating New NCache Licenses
For complete step by step activation of new NCache license, proceed to Activate NCache License. In order to have new version of license key, get in touch with Alachisoft Sales Team. There are two ways you can use to upgrade your application:
Option 1: Recompile Application
On the client side, you just have to rebuild your applications with the latest assemblies or NuGet packages. Other than that, there is no code change required as the same application code will work as is.
If you are using Object Caching, you have to recompile your application. And if you are using View State Caching or Session State Caching, then you have to change the version manually from the Web.config file so that your application can use the latest NCache assemblies. Here is an example of Session State provider that can be changed from the Web.config file:
Enterprise Edition:
<assemblies>
<add assembly="Alachisoft.NCache.SessionStoreProvider, Version=x.x.x.x, Culture=neutral, PublicKeyToken=CFF5926ED6A53769"/>
</assemblies>
Professional and Open Source Editions:
<assemblies>
<add assembly="Alachisoft.NCache.SessionStoreProvider, Version=x.x.x.x, Culture=neutral, PublicKeyToken=1448e8d1123e9096"/>
</assemblies>
Note
Replace Version=x.x.x.x with the NCache version that you have installed.
Similarly, if you are using NCache SessionStore provider module or content
optimization feature, then you need to follow the same process. Find
Alachisoft.NCache.*
and change Version=x.x.x.x with the current version of
the NCache module in use.
Note
NCache module version can be different from the NCache version. For instance, if you have NCache 5.3 SP1, you will still use assembly version of NCache 5.3.
Note
Ensure that your client is added in the cluster before you begin testing.
Option 2: Assembly Redirection
If you find yourself bound by unalterable code requirements then it is strongly recommended to reach out to the Alachisoft Support Team to discuss the specifics of assembly redirection in detail.
Steps to follow for Assembly Redirection:
Using the "Cache Server" Installation option, install NCache on all new NCache servers.
Ensure that NCache is installed on all application boxes by utilizing the NCache "Remote Client" installation option.
For applications employing NCache Session Caching with a Session State Provider assembly, simply include the specified assembly reference in the application's "web.config" file. No code modifications are required.
<assemblies>
<add assembly ="Alachisoft.NCache.SessionStoreProvider, Version=5.3.0.0, Culture=neutral, PublicKeyToken=CFF5926ED6A53769"/>
</assemblies>
- For applications employing NCache Object Caching, apply assembly redirection from version 5.0.0.0 to 5.3.0.0 (sample config below) in the "app.config" for all NCache-related assemblies. No code changes required.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
<probing privatePath="bin\libs"/>
<dependentAssembly>
<assemblyIdentity name="Alachisoft.NCache.Web" publicKeyToken="cff5926ed6a53769"/>
<bindingRedirect oldVersion="5.0.0.0" newVersion="5.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Alachisoft.NCache.Runtime" publicKeyToken="cff5926ed6a53769"/>
<bindingRedirect oldVersion="5.0.0.0" newVersion="5.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Alachisoft.NCache.Management" publicKeyToken="cff5926ed6a53769"/>
<bindingRedirect oldVersion="5.0.0.0" newVersion="5.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Alachisoft.NCache.Cache" publicKeyToken="cff5926ed6a53769"/>
<bindingRedirect oldVersion="5.0.0.0" newVersion="5.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Alachisoft.NCache.Common" publicKeyToken="cff5926ed6a53769"/>
<bindingRedirect oldVersion="5.0.0.0" newVersion="5.3.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Testing the Cache Cluster for Connectivity and Client Operations
You can generate heavy transactional load on a specified cache in order to monitor NCache performance under stress in a given environment using Test-Stress through NCache Management Centre or Powershell cmdlts and then you can also test your client applications.