Troubleshooting
This page outlines common issues you may encounter during NCache installation, along with practical workarounds to help you resolve them quickly and effectively.
Service Login Issue When Using a Custom User for NCache
This issue occurs when a custom (non-local) user is used during NCache installation for administrative rights, but that user does not have permission to log on as a service. Without this permission, Windows blocks the NCache service from running under that user account.
Workaround
Follow these steps for a workaround:
On Windows, search for Local Security Policy.
Go to Local Policies -> User Rights Assignment.
Double-click on Log on as a service. This option will open Local Security Settings where you will find all users who have access to the services.
Click the Add User or Group button and add the user here.
Click on OK and Apply to apply these changes.
Cannot Load File or Assembly System.Security.Principal
Message: Could not load file or assembly 'System.Security.Principal' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
This exception typically occurs in ASP.NET applications targeting .NET Framework 4.6.2 when using NCache. The framework version 4.6.2 does not automatically resolve certain runtime dependencies required by NCache, leading to assembly binding issues.
Workaround
You need to explicitly add assembly binding redirects in your web.config file to resolve these dependencies correctly. Add the following under the
<configuration>
<runtime>
...
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Security.Principal" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Principal.Windows" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
...
</runtime>
</configuration>
See Also