【发布时间】:2024-01-22 06:02:01
【问题描述】:
我正在开发一个 SharePoint 2013 网站,我有 2 种类型的注册:(Win 身份验证和 FBA)。
我正在尝试使用旧门户(SP 2010)中的解决方案(WSP),这个 WSP 使用一个名为 'Microsoft.Practices.EnterpriseLibrary.Data' 的 dll在 SP 2013 环境中不存在。
因此,为了解决我从 Microsoft 安装了 Microsoft Enterprise Library 5.0,然后我将此 dll 复制到 inetpub\wwwroot\wss\VirtualDirectories\80\ 下的 bin 文件夹中
现在,当我使用 Windows 身份验证模式登录网站时,WebPart 出现,但以 FBA 用户身份登录时出现错误:
System.InvalidOperationException: Cannot open log for source 'Microsoft.Practices.EnterpriseLibrary.Data'. You may not have write access. ---> System.ComponentModel.Win32Exception: Access is denied
--- End of inner exception stack trace ---
at System.Diagnostics.EventLogInternal.OpenForWrite(String currentMachineName)
at System.Diagnostics.EventLogInternal.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type)
at ProjectName.Internet.EventViewerLogService.LogEvent(String source, String message, EventLogEntryType type)
at ProjectName.Internet.ExceptionHandler.Handle(Exception exception)
at ProjectName.Internet.SQLHelper.GetVolunteerInfo(String VolunteerId)
at ProjectName.Internet.Profiles.Volunteer.GetVolunteer(String VolunteerId)
at ProjectName.Internet.Accessibility.Accessibility.AccessibilityUserControl.Page_Load(Object sender, EventArgs e)
注意:我试图将“安全”权限授予注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security 到 'Authenticated Users 组',因为我一开始就有错误 错误:未找到源,但无法搜索部分或全部事件日志。无法访问的日志:安全性。
PS:这是对此的跟进。我按照给定的答案,但无济于事。
我猜这是由于服务器上的一些配置问题造成的?
【问题讨论】:
标签: exception-handling sharepoint-2013 event-log windows-server-2012 securityexception