I suspect that this constructor is not actually called in my case and so the policy is not stored in the repository. Later when the throttling core checks the repository for the policy, it doesn't find anything.
You can test this during runtime by calling:
var policy = _PolicyRepository.FirstOrDefault(ThrottleManager.GetPolicyKey());
In my case, this is always null.
If the policy repository is not set in the constructor, the issue disappears. But so long as a custom repository is used, the policy doesn't seem to save in the repository.
Hi, I'm not 100% if this is a bug, but here's where I'm at. If I do:
The policy is not saved in the PolicyRepository.
I suspect that this constructor is not actually called in my case and so the policy is not stored in the repository. Later when the throttling core checks the repository for the policy, it doesn't find anything.
You can test this during runtime by calling:
In my case, this is always null.
If the policy repository is not set in the constructor, the issue disappears. But so long as a custom repository is used, the policy doesn't seem to save in the repository.
Am I missing something?