YES-CMS 内容管理系统 系统初始化后台配置
本章节介绍 YES-CMS 内容管理系统
部署后所需要的一些后台配置
修改 appsettings.json 权限
开始前,需要修改 YES-CMS 内容管理系统 目录中的 appsettings.json 的权限,添加 everyone 的修改权限,不然,后台无法保存配置,会报错误
报错信息如下:
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 内容管理系统
集成后台管理功能,后台管理入口:host/admin
功能路径
进入 YES-CMS 内容管理系统
后台管理,点击 系统管理 → 站点设置
一、基本配置
二、邮件服务器配置
如有疑问,参考 https://www.yesdotnet.com/archive/post/1627995781.html
三、百度收录 URL推送
四、更新站点地图 SiteMap.xml
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
YESCMS 张国生