andreas
andreas

Reputation: 8004

Device not receiving C# Windows Push Notifications because channel url incompatible

After many hours of trial, I still fail to send push notifications to my app. This is what I did so far:

I get the same error using the web service of http://31daysofwindows8.com/push. What can I do here? What could have gone wrong? Please note that this app has not been published yet to the store and I am testing on my local Windows 8.1 installation.

Upvotes: 10

Views: 5418

Answers (4)

Daniel
Daniel

Reputation: 1402

Using Cordova for Windows, I found out, that even after "Associate App with the Store...", Push Messages failed to be delivered.

The issue was, that the App still had default CordovaApp_TemporaryKey.pfx assigned.

After I've copied new CordovaApp.Windows_StoreKey.pfx to CordovaApp_TemporaryKey.pfx message delivery succeed.

Upvotes: 1

Markus Bruckner
Markus Bruckner

Reputation: 2880

I was unable to use the "Associate App" approach because the customer wasn't comfortable with giving us their credentails.

What worked for me was to remove the following two elements from the .csproj file of the app:

<PackageCertificateKeyFile>...</PackageCertificateKeyFile>
<PackageCertificateThumbprint>...</PackageCertificateThumbprint>

Do that by either dragging the file into a text editor or unloading the project (using right click) and editing it using the xml editor (again in the context menu).

These elements might have snuck in when we associated our app with our testing app and stayed there when we removed the association and just set the identity as described by andreas.

<Identity Name="..." Publisher="CN=..." />

Edit: Just found out that doing this might break msbuild scripts that build packages. However, building app packages once within Visual Studio created new versions of these elements which then worked for me.

Upvotes: 4

superuser
superuser

Reputation: 768

MS documents are a nightmare for me, finally I found what need to do is:

right click on your windows store app solution -> "Store" -> "Associate App with the Store..." -> choose your app name and follow the steps until message "successfully" -> rebuild and run

Despite edit manifest manually by strictly follow the documents, but apparently it's not complete enough.

Upvotes: 1

andreas
andreas

Reputation: 8004

Wow, this is unbelievable. I nearly went nuts, but here is the solution (and explanation):

In the windows app dashboard it says that you can set your app identity manually or automatically. I chose to do it manually (I mean, why not?). But that was a mistake. I quote from microsoft.com dashboard:


Set your app's identity values manually

Open your app's AppManifest.xml file in a text editor and set these attributes of the element using the values shown here.

<Identity Name=" MyName.MyApp " Publisher="CN=*******-****-****-****-************" />

This method did not let me receive push notifications!

The only way to get push notifications (for me) was the following: Try to set the app identity automatically by Visual Studio by calling this menu:

PROJECT -> STORE -> ASSOCIATE APP WITH THE STORE...

This solved my problem.

Upvotes: 22

Related Questions