-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure web app iOS notifications are not working. #52
Comments
Please try this workaround. |
hey alex, thanks for reply but its not working still. |
@mohitdangar, if your problem is not related to the one described in the first message, please file a separate issue. Make sure to provide a full stacktrace of the exception. @madhavanadkat, can you please provide a full stacktrace, including the exception message? |
System.Security.Cryptography.NCryptNative.ImportKey(SafeNCryptProviderHandle provider, Byte[] keyBlob, String format) this is the exception and we got from cloud remote debugging. |
alex, we both are in same team, just to avoid confusion. |
Oh, sorry, my bad :)
So there is no exception message shown in the remote debugging? Like in an example below (notice there's a message in the very first line):
|
Exception Message: The system cannot find the file specified. and its raise from below line |
@mohitdangar, thanks! Please take a look at this question. Looks like one just cannot use There are 2 immediate workarounds for this:
I will try to drop the |
thanks @alexalok it will be a great help .. thanks for the quick update. |
@alexalok - for now we have converted our Azure plan from shared to basic B plan and notifications are working. 2 things we needs to do, 1st we need to convert azure plan to basic b1 and alos WEBSITE_LOAD_USER_PROFILE = 1 this key in azure app setting. notifications are working .. for other to help I am updating here. |
Perfect, thanks for sharing! |
Going to close the issue since it seems the proposed workaround did work. Feel free to reopen should you have any more difficulties. |
@alexalok We faced one issue on notification. while we sending more than one notification continues on same device token then it will return the error "TooManyProviderTokenUpdates". Can you help me on this ? |
You should make sure the
So in a nutshell, if you're recreating |
@alexalok thanks for the quick reply, we did the research from our side also and you are right we are generating new token on every request, now we will make the code until 1 hr or less than 1 hr new token will not be generate. will keep you updated over here so, it will be on google for others help as well. |
@mohitdangar what kind of error are you encountering with "The system cannot find the file specified" ? Is it like this: Exception Type: Message: Stack Trace: ?? |
@alexalok but , Certificate-based connection is not supported on all .NET Framework versions and on .NET Core 2.x or lower |
https://stackoverflow.com/a/68913031/9372032 |
Just curious, if ApnsClient and the token should be persisted to avoid APNS throwing the "TooManyProviderTokenUpdates" error, how does one save the bearer toke and provide it to new instances? I do not see any methods to view the bearer token. I have multiple apps, and servers in different geo regions behind load balanced ( web farms). Based on what I am reading, we need to create the apnsClient, then get the bearertoken, store it somewhere so that all servers can get access to, then every 1 hour renew the token, and update all servers. I don't see a way to provide the bearer token to new instances of apnsClient so they do not call APNS and try to create another bearer token. Have I miss understood something? Thanks for any clarity you can provide. |
When we publish this code on Azure - we are getting below error.
We have talked, azure technical support and they are saying -> your code is trying to write something to server area and that is not possible in azure.
this code is generating error on azure server.
var apns = ApnsClient.CreateUsingJwt(new HttpClient(new WinHttpHandler()), options);
can you help with this, any help is much appreciated.
System.Security.Cryptography.NCryptNative.ImportKey(SafeNCryptProviderHandle provider, Byte[] keyBlob, String format)
at System.Security.Cryptography.CngKey.Import(Byte[] keyBlob, String curveName, CngKeyBlobFormat format, CngProvider provider)
at dotAPNS.ApnsClient.CreateUsingJwt(HttpClient http, ApnsJwtOptions options)
at FileReadDemo.Helper.PushNotification.d__1.MoveNext()
The text was updated successfully, but these errors were encountered: