尝试向Azure通知中心注册设备时出错

尝试向Azure通知中心注册设备时出错,azure,xamarin,azure-notificationhub,Azure,Xamarin,Azure Notificationhub,我有一个xamarin应用程序,它将通过Azure函数及其通知中心输出绑定发送通知 在xamarin应用程序中,我有一个android服务,可以获取令牌并存储在缓存中 [Service] [IntentFilter(new[] { "com.google.firebase.INSTANCE_ID_EVENT" })] public class MyFirebaseIIDService : FirebaseInstanceIdService { private App _app =

我有一个xamarin应用程序,它将通过Azure函数及其通知中心输出绑定发送通知

在xamarin应用程序中,我有一个android服务,可以获取令牌并存储在缓存中

    [Service]
[IntentFilter(new[] { "com.google.firebase.INSTANCE_ID_EVENT" })]
public class MyFirebaseIIDService : FirebaseInstanceIdService
{
    private App _app => (App)Xamarin.Forms.Application.Current;
    private readonly ICachingService _cachingService;
    public MyFirebaseIIDService()
    {
        var xx = typeof(ICachingService);
        _cachingService = (CachingService)App.Instance.Container.Resolve(xx);

    }
    public override void OnTokenRefresh()
    {

            var refreshedToken = FirebaseInstanceId.Instance.Token;
            _cachingService.FireBaseToken = refreshedToken;
            Console.WriteLine($"Token received: {refreshedToken}");
       //     SendRegistrationToServerAsync(refreshedToken);

    }

}
用户登录后,我想使用其Id作为标记,并调用另一个android服务,尝试使用此标记注册设备

  var client = new MobileServiceClient(App.MobileServiceUrl);
            var push = client.GetPush();
            var reg = new Registration(token, tags);
            await push.RegisterAsync(reg);
此时,我有一个包含userId的token和tags列表,因为稍后我希望该用户只获得针对他们的通知

在push.RegisterAsyn方法中,我得到一个错误

您正在查找的资源已被删除、名称已更改或暂时不可用

请注意,App.MobileServiceUrl是连接到通知中心的Azure移动应用程序的url

除此之外,这个Azure移动应用程序只有默认的TODO控制器和模板附带的所有内容。我的发送通知代码将在azure函数中使用通知中心输出绑定

我还更新了所有与azure相关的nugets无差异 它尝试点击此url进行注册。
我使用了一个错误的nuget。我不得不使用

Microsoft.Azure.Mobile.Client

相反,我使用的是Azure移动服务nuget

两者都有MobileServiceClient类,这就是我感到困惑的原因。现在我没有例外