UnauthorizedAccessException error using custom application pool identity for .net core 3.1 web app logging to Seq
I want to make sure this is possible. I can't image that it isn't.
I have set up the application pool identity to use a domain account, and I've set an API key for the web app. Now when I start the web app and navigate to it, I get the following error:
An unhandled exception occurred while processing the request.
UnauthorizedAccessException: Access to the path 'C:\Windows\system32\config\systemprofile\AppData\Local\ASP.NET\DataProtection-Keys\7d3eb199-bf4a-47dd-acb9-3589a1bd14df.tmp' is denied.
CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information.
If I set the application pool to load the user profile, then it works, but this causes other issues in my web app.
I can also give the domain account write access to the folder, and this solves the problem, but I don't like that solution.
Is it possible to use a domain account? Is the solution to load the user profile? I hope not because I don't think I can resolve the other issue when I do that.
I'm only using the single license version (at home), but so far I've found Seq amazing and have already talked to my manager at work about getting a license and using this at work.
Posted by Marc Levesque 10 months ago