Configure IP Binding in Multiple NICs (Optional)
If you have multiple network cards (meaning multiple IP addresses) in your cache servers then you must bind NCache server to one of the IP addresses. NCache installer automatically binds the cache server to one of the IP addresses but you may want to change this binding based on your preference. Once bound, this IP address must be specified to identify this cache server both for cluster configuration (config.ncconf) and for client/server configuration (client.ncconf).
Step 1: Modify Cache Service Configuration File
The cache service configuration file found in NCache installation as follows:
- .NET: Alachsioft.NCache.Service.exe.config located in %NCHOME%/bin/service
- .NET Core Windows: Alachsioft.NCache.Service.dll.config located in %NCHOME%/bin/service
<appSettings> ... <add key="NCacheServer.BindToClusterIP" value="188.8.131.52"> <add key="NCacheServer.BindToClientServerIP" value="184.108.40.206"> ... <appSettings>
Step 2: Restart NCache Service
For the configuration changes made to take effect, restart NCache Service. Make sure you have enough privileges to restart the service. If the user is not the part of the Administrator's group, make sure to run PowerShell as administrator, otherwise you might get an error message that "Cannot open ncachesvc service on computer".
Execute the following command in PowerShell to restart NCache Service:
Restart-Service -Name NCacheSvc