Configuring Security for Cache
Security can also be configured on cache itself. This can be done as follow:
Using NCache Manager
Using Command Line Tool
-
Open command prompt
-
Go to the NCache tools directory: cd %NCHOME%/bin/tools
-
Use configurecachesecurity.exe, provide the required information:
configurecachesecurity demoClusteredCache /E /s 20.200.21.95 /U james_tredwell /P yourpassword /C yourdomain.org
-
Hit ENTER key, it will enable security for demoClusteredCache on server 20.200.21.95 and add the user james_tredwell.
-
If you want to add more users, use the following command after step 2:
configurecachesecurity demoClusteredCache /A /N aaron_finch /s 20.200.21.95 /U administrator /P yourpassword /C yourdomain.org
How to pass Security Credentials to API:
User can also pass security credentials to API from the application using the following code:
NCache.InitializeCache("cacheId", new Alachisoft.NCache.Web.Security.SecurityParams("Username", "Password"), null);
See Also