question

ludopierre-5006 avatar image
0 Votes"
ludopierre-5006 asked MarcGeorge-6477 commented

Timeout when trying to get WNS channel

Hello,
I am trying to use Windows Notification Service behind a proxy.
i opened route described by Microsoft to use the service

 <CloudServiceDNS>
 <DNS FQDN="*.notify.windows.com"/>
 </CloudServiceDNS>
 <ClientDNS>
 <DNS FQDN="*.wns.windows.com"/>
 <DNS FQDN="*.notify.live.net"/>
 </ClientDNS>
 <CloudServiceIPs>

but when i try to make

 channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();

I have an timeout exception
My application is a uwp application, created based on tutorials, enrolled with ms store and all is ok with it on a personnal laptop.

When i make a trace on my proxy, it seems windows try to access to https://login.live.com/ppsecure/deviceaddcredential.srf.

My question is: Is login.live.com access mandatory to get a wns channel?
If not, how can i resolve this channel?

Thanks by advance for your help








windows-uwpazure-notification-hubs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered MarcGeorge-6477 commented

Hello, Welcome to Micorosoft Q&A,

My question is: Is login.live.com access mandatory to get a wns channel?

It's necessary to get the channel, and https://login.live.com/ppsecure/deviceaddcredential.srf looks like redirect uri. Derive from Windows Push Notification Services (WNS) overview document, https://login.live.com is the host that use to receive authentication request for wns.

 POST /accesstoken.srf HTTP/1.1
  Content-Type: application/x-www-form-urlencoded
  Host: https://login.live.com
  Content-Length: 211
     
  grant_type=client_credentials&client_id=ms-app%3a%2f%2fS-1-15-2-2972962901-2322836549-3722629029-1345238579-3987825745-2155616079-650196962&client_secret=Vex8L9WOFZuj95euaLrvSH7XyoDhLJc7&scope=notify.windows.com

For your scenario, we suggest you add above host address in the white list.



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

thanks for your answer.
My biggest problem is https://login.live.com is forbidden on our network and will continue to be.
So my question was is this url access mandatory to use the service or is another way to get the token?
Typically, for other usage, we are using https://login.microsoft.com, is it a way to use it instead of login.live.com?

0 Votes 0 ·

The api will access the host internal, we can't edit it to another. so the better way is allow https://login.live.com for your white list.

0 Votes 0 ·

Thank you for validation.
Have a nice day

1 Vote 1 ·

@NicoZhu-MSFT If you are creating a Xamarin UWP app in C# and using CreatePushNotificationChannelForApplicationAsync to create the channel, how do you force the login to live.com before making the call?

0 Votes 0 ·