justdmitry/PassKitHelper

Password required in Azure to avoid "the specified network password is not correct"

benjamingranados opened this issue · 2 comments

I had an error when creating the certificate, and found that this flag is needed

new X509Certificate2(Path, "YOUR PASSWORD", X509KeyStorageFlags.MachineKeySet);

In fact, I passed the path and password vía an Application Setting on Azure.

You are using Windows-based AppServices, right? I always used Linux-based and guess that's the reason I didn't had errors like that. TBH, on my local windows dev machine it also worked fine without additional flags, so maybe it's depends on user-interactive vs service-based mode somehow...

Do you still have some problem you need help with, or you created this issue as a solution for future devs with same error?

Yeah! I'm using a windows based app service and is true, I think it only happens here. But yeah! it was more like a solution for further reference.

Greetings from Mexico 🇲🇽!