我正在尝试使用Azure Notification Hub在Unity3D生成的项目上处理我的MPNS WUP应用程序通知。
我使用以下文章在生成的项目中在Visual Studio 2015中设置它:Getting started with Notification Hubs for Windows Universal Platform Apps
应用程序编译并运行以下异步代码...
var result = await hub.RegisterNativeAsync(channel.Uri);
...控制台打印以下日志:
Exception thrown: 'System.Runtime.InteropServices.COMException' in Microsoft.WindowsAzure.Messaging.Managed.dll
WinRT information: ResourceMap Not Found.
Exception thrown: 'System.TypeInitializationException' in Microsoft.WindowsAzure.Messaging.Managed.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in Microsoft.WindowsAzure.Messaging.Managed.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
OnWebCamTextureToMatHelperDisposed
(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 45)
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Unhandled 'Platform.COMException' exception caught! - 'The text associated with this error code could not be found.
The type initializer for 'Microsoft.WindowsAzure.Messaging.Http.Resources' threw an exception.', Sender: '<null>'. Missing try/catch blocks.
(Filename: C:\buildslave\unity\build\PlatformDependent/MetroPlayer/MetroDebug.cpp Line: 41)
我目前的设置是:
答案 0 :(得分:0)
我们使用相同的how-to文章在本机WUP项目上测试了这个并且遇到了同样的问题。
最后我们发现它与我们想到的Unity或项目配置无关,而是与Azure帐户有关。
Microsoft Azure通知中心上的定价层被定义为免费(限制为500个有效设备),将其更改为基本(限制为200K有源设备)异常消失。
这是一次非常糟糕的体验,我们的团队花了几天时间才找出原因,因为例外与实际问题没有真正的联系,Microsoft Azure仪表板也没有任何与推送注册限制相关的通知。 / p>