I'm running into a problem where UserSecrets returns my secret on Mac, but not windows. I followed https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?tabs=visual-studio
On windows, when I try to get the secret: Configuration["ConnectionStrings:Production"]
it returns null.
I have the secrets.json
file saved at C:\Users\username\AppData\Roaming\Microsoft\UserSecrets\<userSecretsId>
I can't figure out why it won't work on Windows, while it works perfectly on Mac. Any help is greatly appreciated.
It might be worth noting this is on a Windows Server
I'm wondering now if %AppData%
is different in the context of IIS?
I think this thread is the right direction but none of the solutions work for me