Web Push Generation

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
crash
User
Posts: 148

Web Push Generation

Post by crash »

When I try generate web push server public key I get an access violation error at address.
ASPNetmaker.exe Read of address

I have already tried setting the program file to read and write but this did not work

Any help please. (v2023)


MichaelG
User
Posts: 1095

Post by MichaelG »

Delete the cache folder "C:\Users\<user>\AppData\Roaming\ASPNETMaker2023" (<user> is your Windows user name), restart ASP.NET Maker, update to the latest template (Tools -> Update Template) and try again.


crash
User
Posts: 148

Post by crash »

I have managed to get this up, I have also managed to get the keys generated, but now there is no Bell Icon
The help file says choose the group you want to send to in security settings, I have done this.

If I try to add members in the subscription table, which does not make sense, but I tried, then it says I must add a key for every user, does every user need it's own key ?

Web Push is activated in security settings
Key is generated

How do I get the Bell Icon to show, should it be there ?
Do I need a certificate to see it?

Thanks


MichaelG
User
Posts: 1095

Post by MichaelG »

Make sure that you have enabled "Allow anonymous users" if you want anyone accessing the site (without login) to subscribe.

If you have not enabled the "Allow anonymous users", the user will only see the subscription button only after he logins.


crash
User
Posts: 148

Post by crash »

I have enabled allow anonymous user.. still no bell.

I am trying to send to groups.

When i try add users it asks for ID, end point, public key etc...... does every need user their own key, how do add a subscriber.

If that is what will fix my problem.

There is supposed to be a bell icon at the top of each group, must they first be added to the subscription page


MichaelG
User
Posts: 1095

Post by MichaelG »

If you have enabled "Allow anonymous user", you should see the "Enable notification" button on the top left corner of the web site before login, or after login as a non-admin user.

To send the notifications, you need to login as the Admin and go to the subscription table.


crash
User
Posts: 148

Post by crash »

The subscription table is empty.
As asked above, must we add users to the subscription table.
When I try this I get asked for all the keys and tokens.


MichaelG
User
Posts: 1095

Post by MichaelG »

You cannot manually add to the subscription table. The subscription is done by the user clicking the "Enable notification" button.

If you have enabled "Allow anonymous user", you should see the "Enable notification" button on the top left corner of the web site before login, or after login as a non-admin user.


crash
User
Posts: 148

Post by crash »

That also does not work, when the user clicks enable notification, it does not add them to the subscriber's list.
I also tested registering as a new user, even then when the new user enables notification it does not show the bell to send push to that person.


MichaelG
User
Posts: 1095

Post by MichaelG »

That also does not work, when the user clicks enable notification, it does not add them to the subscriber's list.

It should work. You should get the "Notification enabled" message if the subscription is successful.


crash
User
Posts: 148

Post by crash »

It indicates notification enabled, but this does not add anything to the subscribers table


MichaelG
User
Posts: 1095

Post by MichaelG »

Enable debug mode (Tools -> Advanced Settings -> Debug), press F12 to check the network response when adding the subscription.


crash
User
Posts: 148

Post by crash »

Seems I'm getting closer to the problem.
Network error shows

Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'ContentEncoding', table 'xxxxx.dbo.Subscriptions'; column does not allow nulls. INSERT fails.


crash
User
Posts: 148

Post by crash »

After allowing nulls in it is now adding the subscriber table
I will test further


jackoz
User
Posts: 1

Post by jackoz »

I am still getting the Access violation error. I tried every single trick when I hit the Generate button, I keep getting the same error. I use postgres db. Do you have any suggestions?


mobhar
User
Posts: 11660

Post by mobhar »

Make sure your web server can run https.


Post Reply