最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

macos - asp.net cannot delete it's own DataProtection keys - Stack Overflow

programmeradmin1浏览0评论

I'm using Rider to test out 9 in OSX. I created a project with ASP.NET blazor template, and out of the box it refuses to start with an error

 Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[48]
      An error occurred while reading the key ring.
      System.UnauthorizedAccessException: Access to the path '/Users/me/.aspnet/DataProtection-Keys/1961c782-5584-4ea5-b2ca-aab7be755266.tmp' is denied.
       ---> System.IO.IOException: Operation not permitted
         --- End of inner exception stack trace ---
         at System.IO.FileSystem.DeleteFile(String fullPath)

When I play in console, my user can read/write/delete these files just ok. Is Rider using some other service account to debug/run projects, I could not find a setting for this. I tried setting o+rw rights to that folder and individual files, but no use. What do?

I'm using Rider to test out 9 in OSX. I created a project with ASP.NET blazor template, and out of the box it refuses to start with an error

 Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[48]
      An error occurred while reading the key ring.
      System.UnauthorizedAccessException: Access to the path '/Users/me/.aspnet/DataProtection-Keys/1961c782-5584-4ea5-b2ca-aab7be755266.tmp' is denied.
       ---> System.IO.IOException: Operation not permitted
         --- End of inner exception stack trace ---
         at System.IO.FileSystem.DeleteFile(String fullPath)

When I play in console, my user can read/write/delete these files just ok. Is Rider using some other service account to debug/run projects, I could not find a setting for this. I tried setting o+rw rights to that folder and individual files, but no use. What do?

Share Improve this question asked Jan 31 at 17:54 tonsteritonsteri 8558 silver badges21 bronze badges 1
  • I temporarily (no pun inteded) configured it to use /tmp folder for the keys, and app works fine. It's not a permanent solution, trying to still understand why default config won't work (builder.Services.AddDataProtection().PersistKeysToFileSystem(...)) – tonsteri Commented Jan 31 at 18:40
Add a comment  | 

1 Answer 1

Reset to default 0

If the issue still persists, please report it to our YouTrack, so we could take a closer look. Thnx!

发布评论

评论列表(0)

  1. 暂无评论