















在维护老项目时,调用WebService接口返回500,响应内容如下:
{
"Message": "The event source ExceptionManagerPublishedException does not exist and cannot be created with the current permissions.",
"StackTrace": " 在...",
"ExceptionType": "System.Security.SecurityException"
}
ASP.NET应用程序运行的账户没有权限创建和写入 Windows 事件日志源(Event Source),在Windows Server 2008 中事件日志的创建、写入需要管理员级别的权限,而默认的 IIS 应用程序池账户(如 IIS AppPool\应用池名称、Network Service 等)权限不足。
(1)以管理员身份运行命令:
eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO ExceptionManagerPublishedException /D "Created event source for JKCFlowPlatform"

执行成功会提示 SUCCESS: An event of type 'INFORMATION' was created in the 'APPLICATION' log with 'ExceptionManagerPublishedException' as the source.
(2)在事件查看器“Windows 日志”→“应用程序”查看ExceptionManagerPublishedException,能看到刚创建的信息事件即表示成功。

此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。