YES-CMS 内容管理系统 后台配置提交报错


通过系统日志查看错误信息如下:

Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
EventId: 1
SpanId: d0a43efad89b7148
TraceId: 29443db4b6b8af42b14903bb9882f1c5
ParentId: 0000000000000000
RequestId: 80005427-0000-d400-b63f-84710c7967bb
RequestPath: /Admin/SiteInfo/OnSubmitEmail

An unhandled exception has occurred while executing the request.

Exception: 
System.UnauthorizedAccessException: Access to the path 'C:\Jonny's Project\YES-CMS\appsettings.json' is denied.
   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(String path)
   at YESCMS.Libs.GlobalData.WriteAppSetting(JObject jsonObject) in C:\Users\Garson\Desktop\blogs\GZBlog\YESCMS\Libs\GlobalData.cs:line 143
   at YESCMS.Libs.GlobalData.UpdateEmailConfigData(EmailConfig data) in C:\Users\Garson\Desktop\blogs\GZBlog\YESCMS\Libs\GlobalData.cs:line 130
   at YESCMS.Areas.Admin.Controllers.SiteInfoController.OnSubmitEmail(EmailConfig data) in C:\Users\Garson\Desktop\blogs\GZBlog\YESCMS\Areas\Admin\Controllers\SiteInfoController.cs:line 36
   at lambda_method210(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

 

因为没有 yes-cms 内容管理系统 appsettings.json 文件的权限

 

 

版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
张国生
评论列表

发表评论

评论内容
昵称:
关联文章

YES-CMS 内容管理系统 后台配置提交
YES-CMS 内容管理系统 系统初始化后台配置
YES-CMS内容管理系统 代码高亮配置
YES-CMS 内容管理系统 快速发布与部署
YES-CMS 内容管理系统介绍
YES-CMS 内容管理系统 配置数据库连接
YES-CMS内容管理系统插件扩展
YES-CMS内容管理系统 售价
YES-CMS 内容管理系统首页修改指南
YES-CMS内容管理系统 项目问题集锦
YES-CMS内容管理系统运行首页没有Header
YES-CMS内容管理系统 页面模板介绍
YES-CMS 内容管理系统 项目源码介绍
YES-CMS 内容管理系统 用户登录密码修改
YES-CMS 内容管理系统 关于本站页面调整
YES-CMS 内容管理系统 TinyMCE编辑插件演示
插入代码页面
微信支付:JSAPI支付失败 :微信登录失败, redirect_uri域名与后台配置不一致,错误码:10003
YES-WIN Winform开发框架 日志管理升级指南
window远程桌面连接:出现身份验证错误。要求的函数不受支持