Troubleshooting
This page guides you about the possible exceptions which you may encounter while using the NCache along with the appropriate workarounds to deal with them.
Disabling BinaryFormatter Serialization And Deserialization
Message: BinaryFormatter serialization and deserialization are disabled within this application.
You'll encounter this exception with ASP.NET 5.0 or above and .NET 8.0 and above. As in both cases, the Binary Formatter is disabled by default. As in both cases, the Binary Formatter is disabled by default. This issue can be solved by using the following workarounds.
Workaround
- Enable the Binary Formatter by adding adding following tag in
project.csproj
file:
<PropertyGroup>
...
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
...
</PropertyGroup>
Note
This is explained further here.
- Alternatively, you can use JSON Serialization instead of Binary Serialization as the serialization format at the time of cache creation.
Note
It is recommended that you use the JSON serialization.
No sigar-amd64-winnt.dll in java.library.path
If you haven't included the sigar-amd64-winnt.dll
file for Windows or the sigar-amd64-winnt.so
file for Linux in your classpath, you will encounter this warning, and when this happens, you won't be able to monitor your counters (in Java).
Workaround
Include the sigar-amd64-winnt.dll
file for Windows or the sigar-amd64-winnt.so
file for Linux in your classpath.