NCache 4.6 - Online Documentation


This exception is raised if an unauthorized user tries to perform cache operations, or wrong credential information is given in the InitializeCache() overload given below or in client.ncconf file.
To avoid security exception, do the following :
  • Check if you have given correct credential information through API or in client.ncconf. A typing mistake can be the result of this exception.
  • See if the specified user exists under given domain in LDAP. Login credentials are required to belong to any WINDOWS Server hosting the user login and running Active Directory services.
  • Check if you have given a double slash '//' to separate domain name and User ID when passing them as a string through API. Sometimes a single slash is given, which is recognized as an escape sequence. In that case, no compile time error arises, rather it results in a security exception. Correct way to pass security information through API is shown below:
// Initialize the cache
NCache.InitializeCache("mySessionCache", primaryUserCredentials, secondaryUserCredentials);
See Also