API Management returns 500 due to an APIM internal error
Hello,
/// edit
Just to make it clear:
- This is a fatal error in the API Management itself
- The error happens within an SLA covered instance
///
A left an API Management untouched for some time and suddenly we are getting 500er return codes.
Trace and Diagnostics do not work, but I managed to find a way to get the internal error message from API Management:
"Policy parsing failed for Api transport;rev=1 (revision 29881861)",
"An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = AuthenticationTokenPolicy (DelegateActivator), Services = [Microsoft.WindowsAzure.ApiManagement.Proxy.Gateway.Policies.IPolicy], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> Could not load file or assembly 'Microsoft.Extensions.Caching.Memory, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (See inner exception for details.)",
"Could not load file or assembly 'Microsoft.Extensions.Caching.Memory, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
The API Management is on consumption tier and the request is not reaching the backend.
The Error Stack here is really from the API Management itself.
When I run diagnostics, I get the error "Sorry, an error occurred. Please refresh the page and try again.".
How can I get rid of this error?