Upgrade NCache Version Offline
If you do not want to live upgrade NCache, you can upgrade it through the previous conventional method:
Create Backup of config.ncconf (Optional)
If you are upgrading a major version of the NCache, then in order to restore old configurations you need to create a backup of config.ncconf file to restore old configurations. However, it is recommended to use new configuration settings in case of major version upgrade. Also refer back to the backup config.ncconf to see what options you have already configured in order to have exactly same configuration settings again. Backup of log files can also be kept for history purposes.
Uninstall 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_18.104.22.168__cff5926ed6a53769\Alachisoft.NCache.Web.dll` 2. `[SystemDrive]:\Windows\Microsoft.NET\Assembly\GAC_64\Alachisoft.NCache.Web\v4.0_22.214.171.124__cff5926ed6a53769\Alachisoft.NCache.Web.dll`
- For NCache 4.3 and above, remove assemblies manually from
Install New Version
Install new version of NCache. For 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 in the cache, if cache is already started.
- Get-CacheCount will return the number of total item exist in cache.
- Get-Caches will show all the created caches on 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 version manually from Web.config file, generally their versions are not changed. But still it can be changed from Web.config file, for example:
<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>
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.
NCache module version can be different from the NCache version.