diff --git a/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs b/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs index cc3d2d7731..5ba4a766b1 100644 --- a/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs +++ b/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs @@ -138,7 +138,7 @@ namespace Microsoft.AspNet.Security.DataProtection #if !ASPNETCORE50 // Environment.GetFolderPath returns null if the user profile isn't loaded. string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - if (folderPath != null) + if (!String.IsNullOrEmpty(folderPath)) { // TODO: Remove BETA moniker from below. return new DirectoryInfo(Path.Combine(folderPath, "ASP.NET", "keys-BETA"));