Access to the path 'C:\Windows\TEMP\xxx.tmp' is denied.


请求API发生异常:

Markup 全选
【时间】:2023/1/24 21:07:41
【异常类型】:UnauthorizedAccessException
【异常信息】:Access to the path 'C:\Windows\TEMP\ASPNETCORE_545beb27-5951-4731-84f0-f57836d4b490.tmp' is denied.
【堆栈调用】:   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.CreateTempFile()
   at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions.DrainAsync(Stream stream, ArrayPool`1 bytePool, Nullable`1 limit, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
   at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
   at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value, Object container)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
【异常方法】:Microsoft.Win32.SafeHandles.SafeFileHandle CreateFile(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions)

解决方案

找到项目的应用程序池,将高级设置中“加载用户配置文件”(Load User Profile)设置为true即可。

Access to the path 'C:\Windows\TEMP\xxx.tmp' is denied.

版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
张国生
上一篇:windows Nginx配置开机自启动
下一篇:windows Redis配置
评论列表

发表评论

评论内容
昵称:
关联文章

Access to the path 'C:\Windows\TEMP\xxx.tmp' is denied.
C# Path.GetRandomFileName 方法
.net Core Swagger报错 the same schemaid is already used for type swagger
WCF中常见的报错:The content type text
Python Windows服务
windows申请免费SSL证书-Let's Encrypt
.netcore 打开SQLite数据库失败:You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init().”
VS制作C#程序windows安装程序
Linq to SQL语句基础讲解
C#】C#中使用GDAL3(三):Windows下编译插件驱动
ACCESS密码查看
.Net启动程序报错:It was not possible to find any compatible framework version
如何关掉the fake serial number> 弹窗
EF生成迁移脚本报错:Entity type '' has a split mapping, but it doesn't map any non-primary key property to the main store object. Keep at least one non-primary key property mapped to a column on '.
C# Winform选择文件夹目录
探索 dotnet core 为何在 Windows7 系统需要补丁的原因
C# 编写一个小而快的 Windows 动态桌面
C#的进化——C#发展史、C#1.0-10.0语法系统性梳理、C#与JAVA的对比
C# 获得根路径
C#操作 配置文件*.ini

联系我们
联系电话:15090125178(微信同号)
电子邮箱:garson_zhang@163.com
站长微信二维码
微信二维码