gpt4 book ai didi

asp.net - Web 事件提供程序 'EventLogProvider' 引发了以下异常

转载 作者:行者123 更新时间:2023-12-04 18:49:34 28 4
gpt4 key购买 nike

很难说出这里问的是什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或言辞激烈,无法以目前的形式合理回答。如需帮助澄清此问题以便可以重新打开,visit the help center .




9年前关闭。




在 Windows 2008 R2 中,我无法在 IIS 7 上运行新的 ASP.NET 4.0 应用程序。我在事件日志中只能看到以下错误。我似乎无法找到有关它的含义的任何信息,有人可以帮忙吗?

Log Name:      Application
Source: ASP.NET 4.0.30319.0
Date: 11/27/2011 4:22:13 PM
Event ID: 1301
Task Category: Web Event
Level: Error
Keywords: Classic
User: N/A
Computer: [myserver].[mydomain].com
Description:
The following exception was thrown by the web event provider 'EventLogProvider' in the application '/[myapp]' (in an application lifetime a maximum of one exception will be logged per provider instance):

System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at System.Security.Principal.WindowsIdentity.get_AuthenticationType()
at System.Web.Management.EventLogWebEventProvider.AddWebRequestInformationDataFields(ArrayList dataFields, WebRequestInformation reqInfo)
at System.Web.Management.EventLogWebEventProvider.ProcessEvent(WebBaseEvent eventRaised)
at System.Web.Management.WebBaseEvent.RaiseInternal(WebBaseEvent eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 4.0.30319.0" />
<EventID Qualifiers="49152">1301</EventID>
<Level>2</Level>
<Task>3</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2011-11-27T21:22:13.000000000Z" />
<EventRecordID>1357</EventRecordID>
<Channel>Application</Channel>
<Computer>[myserver].[mydomain].com</Computer>
<Security />
</System>
<EventData>
<Data>EventLogProvider</Data>
<Data>/[MyApp]</Data>
<Data>System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at System.Security.Principal.WindowsIdentity.get_AuthenticationType()
at System.Web.Management.EventLogWebEventProvider.AddWebRequestInformationDataFields(ArrayList dataFields, WebRequestInformation reqInfo)
at System.Web.Management.EventLogWebEventProvider.ProcessEvent(WebBaseEvent eventRaised)
at System.Web.Management.WebBaseEvent.RaiseInternal(WebBaseEvent eventRaised, ArrayList firingRuleInfos, Int32 index0, Int32 index1)</Data>
</EventData>
</Event>

最佳答案

这是因为您的代码正在尝试写入事件日志,但运行应用程序池的用户没有此权限。

如果您无法更改应用程序池标识,您将需要更改应用程序池以作为不同用户运行或让您的网站模拟知名用户。

关于asp.net - Web 事件提供程序 'EventLogProvider' 引发了以下异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8290791/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com