System.ComponentModel.Win32Exception: 拒绝访问怎么办啊??
“/EntLibSecTest”应用程序中的服务器错误。
--------------------------------------------------------------------------------
拒绝访问。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.ComponentModel.Win32Exception: 拒绝访问。
源错误:
行 22:
行 23: Dim identity As IIdentity
行 24: authenticated = authprovider.Authenticate(credentials, identity)
行 25:
行 26: If Not authenticated Then
源文件: c:\inetpub\wwwroot\EntLibSecTest\Helper\SecurityHelper.vb 行: 24
堆栈跟踪:
[Win32Exception (0x80004005): 拒绝访问。]
[InvalidOperationException: 无法打开源 {0} 的日志。您可能不具有写访问权。]
System.Diagnostics.EventLog.OpenForWrite() +366
System.Diagnostics.EventLog.WriteEvent(Int32 eventID, Int16 category, EventLogEntryType type, String[] strings, Byte[] rawData) +280
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +462
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category) +21
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID) +15
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type) +11
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.PerformanceCounterInstances.ReportCounterFailure(String message)
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.PerformanceCounterInstances..ctor(String categoryName, String counterName, Boolean createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.AddPerformanceCounter(String category, String[] counterNames, Boolean createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.Initialize(String counterCategory, String[] counterNames, Boolean createNewInstance, String eventLogSource, EventLogIdentifier[] eventIds)
Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent..ctor(String counterCategory, String[] counterNames, Boolean createNewInstance, String eventLogSource, EventLogIdentifier[] eventIds)
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataServiceEvent..ctor(String[] counterNames, EventLogIdentifier[] eventLogIds)
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent..ctor(String[] counterNames, EventLogIdentifier[] eventLogIDs)
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent..cctor()
[TypeInitializationException: “Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent”的类型初始值设定项引发异常。]
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String connectionString) +0
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String connectionString)
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection()
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(DBCommandWrapper command)
Microsoft.Practices.EnterpriseLibrary.Security.Database.UserRoleManager.GetPassword(String userName)
Microsoft.Practices.EnterpriseLibrary.Security.Database.Authentication.DbAuthenticationProvider.PasswordsMatch(Byte[] password, String userName)
Microsoft.Practices.EnterpriseLibrary.Security.Database.Authentication.DbAuthenticationProvider.Authenticate(Object credentials, IIdentity& userIdentity)
EntLibSecTest.SecurityHelper.Authenticate(String username, String password) in c:\inetpub\wwwroot\EntLibSecTest\Helper\SecurityHelper.vb:24
EntLibSecTest.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\EntLibSecTest\WebForm1.aspx.vb:38
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.2300; ASP.NET 版本:1.1.4322.2300