Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 Jahre weitere
An unhandled exception occurred while processing the request.

UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\App_Data\DataProtectionKeys\87878c88-9a3a-4afe-a9fc-536ac04b5119.tmp' is denied.

System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)

CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information.

Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(byte[] plaintext)
Stack
Query
Cookies
Headers
Routing


UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\App_Data\DataProtectionKeys\87878c88-9a3a-4afe-a9fc-536ac04b5119.tmp' is denied.

System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)


System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)


System.IO.FileStream..ctor(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)


System.IO.FileStream..ctor(string path, FileMode mode, FileAccess access, FileShare share)


System.IO.File.OpenWrite(string path)


Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.StoreElementCore(XElement element, string filename)


Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.StoreElement(XElement element, string friendlyName)


Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.CreateNewKey(Guid keyId, DateTimeOffset creationDate, DateTimeOffset activationDate, DateTimeOffset expirationDate)


Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.CreateNewKey(DateTimeOffset activationDate, DateTimeOffset expirationDate)


Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded)


Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now)


Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, bool forceRefresh)


Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRing()


Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(byte[] plaintext)





Show raw exception details




CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information.

Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(byte[] plaintext)


Microsoft.AspNetCore.Session.CookieProtection.Protect(IDataProtector protector, string data)


Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)


Nop.Services.Installation.InstallUrlMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in InstallUrlMiddleware.cs


Nop.Services.Common.KeepAliveMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in KeepAliveMiddleware.cs


Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)


Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)


Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)


Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)


Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)


Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)



how do i fix this
3 Jahre weitere
it is installed on windows server 2019 DataCenter
3 Jahre weitere
Hi,
I am having the same error. The site is hosted on a shared server. I did confirm I have write access thru ftp to the DataProtectionKeys folder

UnauthorizedAccessException: Access to the path 'D:\Inetpub\vhosts\xisapi.com\marthalex.xisapi.com\App_Data\DataProtectionKeys\d9a78446-5185-4123-83e2-67b39fd7c4ff.tmp' is denied.
3 Jahre weitere
Might be this below link help you.

https://github.com/dotnet/aspnetcore/issues/1983
2 Jahre weitere
Hi  how to fix it?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.