AspNet Core using in memory repo for data protection when running in IIS

mrahhal :

I'm running a production server (Windows Server 2012) with an AspNet Mvc Core RC1 website.

I'm seeing the following in the logs:

Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.

After inspecting the source code for DataProtection, I tracked the problem to the following method call:

Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)

This is probably returning null on the server for some reason. I don't have any special custom configuration in place and I've read the docs so I thought the default would work.

I think the problem is with the IIS website not running in a certain user's context but I have no idea how to confirm or fix this. My website is configured with its own pool.

As an aside: the result of running an in memory repository for storing keys causes them to recycle whenever the application exits which is very annoying and not even intended for use in production environments.

mrahhal :

User profile should be loaded in IIS configuration.

Open IIS, right click on Application Pools then Advanced Settings. And set "Load user profile" to true. Restart your app and it should work perfectly.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

AspNet Core using in memory repo for data protection when running in IIS

分類Dev

AspNet Core using in memory repo for data protection when running in IIS

分類Dev

Where do logs go when running ASP.NET Core on IIS 7.5?

分類Dev

Is using multiple partitions a good data protection strategy?

分類Dev

ASP.Net Core Data Protection API in a Clustered Environment

分類Dev

Using Google OAuth to secure web services in aspnet core

分類Dev

OpenCover for ASP.Net Core application running on IIS Express

分類Dev

NLog AspNet Core 5.0

分類Dev

Login Failed for MSSQLLocalDB when running IIS Express from Jenkins

分類Dev

Conflict when running IIS and WCF application listening on the same port (443)

分類Dev

Analyze memory dump of a dotnet core process running in Kubernetes Linux

分類Dev

Discovering Memory Leaks in .NET Core using PerfView

分類Dev

NSURLCache and Data Protection

分類Dev

Is it possible to resolve a DCOM Interactive User permission error, when using DCOM with IIS and .aspx pages displaying data from a database?

分類Dev

AspNet Core CookieAuthentication with injected SessionStore

分類Dev

Not able to add repo when APT is using a proxy connection

分類Dev

Improve memory usage when importing data

分類Dev

Running portable executable in memory using the WinApi - C Programming

分類Dev

shared memory performance and protection from other processes

分類Dev

Merge conflict when multiple core data inserts are dispatched to NSPersistentContainer using performBackgroundTask

分類Dev

Swap memory, and when the OS starts using it

分類Dev

Segmentation Fault when running a script using System ()

分類Dev

issue when running an exe file using PSexec

分類Dev

Use Authorization middleware instead of AuthorizationAttribute ASPNET Core

分類Dev

Http Query Parameters in UTC in AspNet Core

分類Dev

Model binding not working in aspnet core web api

分類Dev

AspNet Core3ID構成

分類Dev

Core Data is deleting records when app crashes

分類Dev

EF Core Migration not working when using `ApplyConfiguration`

Related 関連記事

  1. 1

    AspNet Core using in memory repo for data protection when running in IIS

  2. 2

    AspNet Core using in memory repo for data protection when running in IIS

  3. 3

    Where do logs go when running ASP.NET Core on IIS 7.5?

  4. 4

    Is using multiple partitions a good data protection strategy?

  5. 5

    ASP.Net Core Data Protection API in a Clustered Environment

  6. 6

    Using Google OAuth to secure web services in aspnet core

  7. 7

    OpenCover for ASP.Net Core application running on IIS Express

  8. 8

    NLog AspNet Core 5.0

  9. 9

    Login Failed for MSSQLLocalDB when running IIS Express from Jenkins

  10. 10

    Conflict when running IIS and WCF application listening on the same port (443)

  11. 11

    Analyze memory dump of a dotnet core process running in Kubernetes Linux

  12. 12

    Discovering Memory Leaks in .NET Core using PerfView

  13. 13

    NSURLCache and Data Protection

  14. 14

    Is it possible to resolve a DCOM Interactive User permission error, when using DCOM with IIS and .aspx pages displaying data from a database?

  15. 15

    AspNet Core CookieAuthentication with injected SessionStore

  16. 16

    Not able to add repo when APT is using a proxy connection

  17. 17

    Improve memory usage when importing data

  18. 18

    Running portable executable in memory using the WinApi - C Programming

  19. 19

    shared memory performance and protection from other processes

  20. 20

    Merge conflict when multiple core data inserts are dispatched to NSPersistentContainer using performBackgroundTask

  21. 21

    Swap memory, and when the OS starts using it

  22. 22

    Segmentation Fault when running a script using System ()

  23. 23

    issue when running an exe file using PSexec

  24. 24

    Use Authorization middleware instead of AuthorizationAttribute ASPNET Core

  25. 25

    Http Query Parameters in UTC in AspNet Core

  26. 26

    Model binding not working in aspnet core web api

  27. 27

    AspNet Core3ID構成

  28. 28

    Core Data is deleting records when app crashes

  29. 29

    EF Core Migration not working when using `ApplyConfiguration`

ホットタグ

アーカイブ