Upgrade NCache Version Offline
If you do not want to live upgrade NCache, you can upgrade it through the conventional method:
Create a Backup of config.ncconf (Optional)
If you are upgrading a major version of the NCache, then to restore old configurations you need to create a backup of the config.ncconf file to restore old configurations. However, it is recommended to use new configuration settings in case of a major version upgrade. Also, refer back to the backup config.ncconf to see what options you have already configured to have the same configuration settings again. Backup of log files can also be kept for history purposes.
Uninstall the current version of NCache. If any application is using NCache and you uninstall NCache, an error message will be displayed as shown below.
Here you will have to remove the assemblies manually:
Remove .NET Framework 2.0 assemblies from
Remove .NET Framework 4.0 assemblies from
For NCache 3.8 remove assemblies manually, e.g.
1. `[SystemDrive]:\Windows\Microsoft.NET\assembly\GAC_32\Alachisoft.NCache.Web\v4.0_22.214.171.124__cff5926ed6a53769\Alachisoft.NCache.Web.dll` 2. `[SystemDrive]:\Windows\Microsoft.NET\Assembly\GAC_64\Alachisoft.NCache.Web\v4.0_126.96.36.199__cff5926ed6a53769\Alachisoft.NCache.Web.dll`
- For NCache 4.3 and above, remove assemblies manually from
Install New Version
Install the new version of NCache. For a complete step-by-step installation process see Installation Guide.
After installation, you can verify whether NCache has been installed correctly or not by using some PowerShell tools such as:
- Start-Cache will start the required cache.
- Add-TestData will add 10 items to the cache if the cache is already started.
- Get-CacheCount will return the number of total items that exist in the cache.
- Get-Caches will show all the created caches on the current machine.
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 may have to change the version manually from the Web.config file generally their versions are not changed. But still, it can be changed from the Web.config file, for example:
<assemblies> <add assembly="Alachisoft.NCache.SessionStoreProvider, Version=x.x.x.x, Culture=neutral, PublicKeyToken=CFF5926ED6A53769"/> </assemblies>
NCache Professional and Open Source:
<assemblies> <add assembly="Alachisoft.NCache.SessionStoreProvider, Version=x.x.x.x, Culture=neutral, PublicKeyToken=1448e8d1123e9096"/> </assemblies>
Replace Version=x.x.x.x with the NCache version that you have installed.
Similarly, if you are using the 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.
The NCache module version can be different from the NCache version.