CrumpledDog / Umbraco-AzureCDNToolkit

Makes it easy to fully utilise the Azure CDN with a Umbraco website
13 stars 14 forks source link

GetAllServers Api return null value #28

Open ssplyuvrajsingh opened 4 years ago

ssplyuvrajsingh commented 4 years ago

Hello I am facing an issue while installing Azurecdn Toolkit package. After installing this package GetAllserver ape called and it returns a null value. Please Help

image

c9mb commented 4 years ago

I encountered the same issue, where the resource promise to GetAllServers calls ApplicationContext.Services.ServerRegistrationService.GetActiveServers() which returns null. I solved for my case by calling CurrentServerIdentity instead of GetActiveServers which works where you only have the one to resolve. It was unclear to me that the project source code was the latest 0.2.0-alpha-000062 version, so I wrote my own simple UmbracoAuthorizedJsonController and a resource promise to call it, and made it a fallback in the dashboard's angular controller. It works, albeit after a time-out waiting for the original to fail, however if I was sure that that the source code is the latest, then changing CacheApiController.cs would be more sensible.