• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • Install NCache (.NET Edition)
  • Prerequisites
Show / Hide Table of Contents
  • Getting Started with NCache
  • Install NCache (.NET Edition)
    • Prerequisites
    • Installer
  • Install NCache (Java Edition)
    • Prerequisites
    • Installer
    • Docker
  • Getting Started with NCache Cloud
  • Distributed Cache
    • Create Cache
    • Add Local/Remote Clients
    • Simulate Cache Usage
    • Monitor Cache
  • Persistent Distributed Cache
    • Create Cache
    • Add Local/Remote Clients
    • Simulate Cache Usage
    • Monitor Cache
  • Pub/Sub Messaging Cache
    • Create Cache
    • Add Local/Remote Clients
    • Simulate Cache Usage
    • Monitor Cache
  • Clients
    • .NET Client
      • Data Caching
      • ASP.NET Core Sessions
      • Pub/Sub Messaging
    • Java Client
      • Data Caching
      • Java Web Sessions
      • Pub/Sub Messaging
    • Python Client
      • Data Caching
      • Pub/Sub Messaging
    • Node.js Client
      • Data Caching
      • Web Sessions
      • Pub/Sub Messaging

Ensure Environment Prerequisites for .NET Cache

Before you start creating caches and cache clusters, you need to ensure that the following criterias are met:

  • During installation, the NCache Service should run under a user with admin privileges. If you have provided these credentials at the time of setup installation, then you do not need to run NCache Service as administrator. But, in case you did not, you can do so by following the steps mentioned in the Run NCache Service as Administrator section.

  • If the firewall is enabled, then you need to ensure that the NCache specific ports are exposed, the details of which are provided in the Configure Firewall section.

  • If you're using a Distributed Cache with Persistence in-memory store type, it is strongly encouraged that you use an SSD instead of an HDD for optimal performance.

Run NCache Service as Administrator for .NET Cache

You must run NCache Service as your local Administrator to publish PerfMon counters in .NET.

  • Go to the Start menu on the Taskbar and type Services.

  • Go to Services and then select NCacheSvc.

  • Right-click on NCacheSvc and select Properties.

  • From the Properties Window, select Log On and enter the Administrator's credentials. Select Apply.

  • It prompts you with a WARNING window which requires a Service Restart for changes to take effect. Restart the NCache Service by right-clicking on NCacheSvc.

Configure Firewall (Optional)

If you have a firewall or a router between your cache clients (web/app servers) and the cache servers, then you must open up specific ports in your firewall. This will ensure that cache clients are able to talk to the cache servers.

NCache server uses the following TCP ports for communication.

  • Client/Server Port: 9800 (Default TCP port for cache client and server communication).
  • Management Port: 8250 (Default TCP port for PowerShell cmdlets and NCache Service).
  • Cluster Port: Cluster port that you define in a cache cluster configuration. It is recommended to use a consecutive range of ports (the default range is 7800-7900). Configure firewall to allow communication on this port range.
  • Cache Management Port: The port range for cache management. The default port range is 8300-8400.
  • NCache Management Port: 8251 (Default TCP port for NCache Management Center).
  • Prometheus Server Port: 9090 (Default port at which the Prometheus server runs).
  • SNMP Listeners Info Port: 8256 (Default port at which SNMP listens to). This port is configurable and can be changed in the Alachisoft.NCache.Service.dll.config file.
  • Metrics Server Port: 8255 (Default TCP port for the Metrics Server). The Prometheus agent also uses this port. This port is configurable and can be changed in the Alachisoft.NCache.Service.dll.config file.

If you want to use the bridge, open the following ports:

  • Bridge Port: Default is 9900.
  • Bridge Management Port: Default is 8260.
  • Bridge Ports: Default range is 10000-11000.
Note

In case of port conflict, i.e., the above default ports are being used by other applications, then you must configure all the cache servers to use different ports.

Step 1: Modify The Service Configuration File

You can also change ports by modifying the service configuration file of all servers. This file is found in the NCache installation directory as follows:

  • .NET Framework: Alachisoft.NCache.Service.exe.config located in %NCHOME%\bin\service
  • .NET: Alachisoft.NCache.Service.dll.config located in %NCHOME%\bin\service

Change the “Port” for Client/Server communication and “ManagementPort” for NCache management in the file below.

<appSettings>
      ...
      <add key="NCacheServer.Port" value="9800"/>
      ...
      <add key="NCacheServer.ManagementPort" value="8250"/>
      ...
</appSettings>

Step 2: Restart NCache Service

For the configuration changes made to take effect, restart the NCache Service. Make sure you have enough privileges to restart the service. If the user is not part of the Administrator's group, make sure to run Windows PowerShell as administrator, otherwise you might get an error message stating Cannot open ncachesvc service on computer.

Execute the following command in the terminal of your choice to restart the NCache Service:

Restart-Service -Name NCacheSvc

See Also

Create a Cache
Simulate Cache Usage
Monitor Caches

In This Article
  • Run NCache Service as Administrator for .NET Cache
  • Configure Firewall (Optional)
    • Step 1: Modify The Service Configuration File
    • Step 2: Restart NCache Service
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top