aspnet/DataProtection

log reports DataProtection-Keys using non-existent directory - causes VS to hang

Closed this issue · 3 comments

From @esargent on June 10, 2016 21:35

I ran into this after I ran into the issue aspnet/Hosting#791
The stack exchange article mentions deleting old DataProtection-Keys directories which is what I did - and it got me past the issue in 791.

But then I ran into an issue where Visual Studio hung on the "Debug is Starting" window. So I left VS and went directly to powershell, which let me see this line:

User profile is available. Using 'C:\Users\esargent\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.

However the directory didn't exist, so I recreated it and that fixed the problem.

I admit this is self-inflicted, but I am reporting it as an issue because the log output claims it found and is using that directory, even though the directory doesn't exist. And, apparently, that causes Visual Studio to hang.

nodataprotection directory
Screenshot shows Windows Explorer and powershell output side-by-side.

Copied from original issue: aspnet/Hosting#798

@esargent does this still repro with RTM bits?

The RTM install didn't have any issues. But I had already recreated the directory and everything was working fine.

Just to confirm I went in when I got your message and deleted the directory. 'dotnet run' recreated the directory and once I logged in a user recreated the needed key in that directory so it appears everything is working properly. Looks good to close.

@esargent Thanks!