Xamarin.Forms Azure 推送通知 - "MobileServiceInvalidOperationException: You do not have permission to view this directory or page"

Xamarin.Forms Azure Push Notifications - "MobileServiceInvalidOperationException: You do not have permission to view this directory or page"

我正在尝试在我的 Xamarin.Forms 应用程序中实施推送通知。
我已关注 this Microsoft doc,但在

上收到 Unauthorized 错误
await push.RegisterAsync(RegistrationID, templates);  

行。异常如下:
Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: You do not have permission to view this directory or page.

我添加了 Sender ID(来自 Firebase)(他们在文档中称之为 "project number")

public class PushHandlerBroadcastReceiver : GcmBroadcastReceiverBase<GcmService>
{
    public static string[] SENDER_IDS = new string[] { "<my_sender_id_here>" };
}

我还在 Azure 门户的通知中心将 Server key(来自 Firebase)添加到 "Google (GCM) API Key"。

我已经在我的 AVD 上登录了一个 Google 帐户。 (我还使用 Azure AD B2C 登录到 Azure MobileServicesClient,但我认为这不重要。)

我找到了 other people with this same issue(搜索 "permission",直接链接不起作用),但只有一个实例。没有人提供解决方案。

我错过了什么?

我猜你只是没有看到我的任何回复,因为我已经回答了六次。

应用服务推送当前存在问题。该修复程序需要在 Azure 应用服务中推出,因此不会很快。

相反,请查看我的书的第 5 章 http://aka.ms/zumobook - 它提供了您需要的确切替代代码。提供的代码在修复后和现在都可以正常工作,因此您的代码不必再次更改。

我想我找到了一个更合理的解决方案。由于我们都在遵循有关移动应用程序的教程,因此我们已将身份验证添加到我们的后端。在使用我们的设备注册推送通知时,我们没有首先进行身份验证,因此我们所有的设备注册都失败了(并且没有显示在我们中心的 'Device Registrations' 选项卡中(在 Visual Studio 中)。更改选项'Action to take when request is not authenticated' 到 'Allow Anonymous requests (no action)' 成功了!设备正在显示并发送推送通知!