diff --git a/src/Microsoft.AspNetCore.DataProtection/Repositories/FileSystemXmlRepository.cs b/src/Microsoft.AspNetCore.DataProtection/Repositories/FileSystemXmlRepository.cs index a980e7f82c..914cc3f9ba 100644 --- a/src/Microsoft.AspNetCore.DataProtection/Repositories/FileSystemXmlRepository.cs +++ b/src/Microsoft.AspNetCore.DataProtection/Repositories/FileSystemXmlRepository.cs @@ -230,7 +230,9 @@ namespace Microsoft.AspNetCore.DataProtection.Repositories // Once the file has been fully written, perform the rename. // Renames are atomic operations on the file systems we support. _logger.WritingDataToFile(finalFilename); - File.Move(tempFilename, finalFilename); + + // Use File.Copy because File.Move on NFS shares has issues in .NET Core 2.0 + File.Copy(tempFilename, finalFilename); } finally {