I have an asp.net app. Pure 3.5 is SP1, which is running in Win7. During the login process, ASP writes some security logs (this sounds acceptable to me) in the event log within the Net login control. The problem is that it appears that the app is not allowed to do this. There is an error:
Details : Security policy attempted to not allow any action Please contact your system administrator for the required permissions to the application or change the trust level of the application in the configuration file.
Exceptions Description: System.Security.SecurityException: request for such permission 'System.Diagnostics.EventLogPermission, System, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = B77a5c561934e089 'has failed.
Stack trace does not display a line of code from everyone in its application, its outline. Last 5 rows: System.Security.CodeAccessSecurityEngine.Check (commodity demand, StackCrawlMark & amp; stackMark, Boolean isPermSet) +0 System.Security.CodeAccessPermission.Demand () +61 System.Diagnostics.EventLog..ctor ( LogName string, string machineName, string source) +125 System.Diagnostics.EventLog..ctor () +24 System.Diagnostics.EventLog.WriteEntry (string source, string message, EventLogEntryType type, Int32 EventID, Intl6 category, byte [] rawData ) +52
This same app works fine on XP SP2 I have hunted around and can not allow. I have tried to run the HTE Pool Pool as a local system and apppill identi.
Is this the easiest way to walk? If I have security holes opened by my local dev machine and I do not care, as long as I need code (ie I solutions as the need to modify a inetmgr change or web.config or local permissions, etc. to happen ).
Thank you!
This appears to discuss your issue. I'm not sure about the differences between vs Win 7, assembly writing though the event log (and all calling assemblies) must EventLogPermission default CAS on XP (Code Access Security).
You can add attribute or sign Assembly with A.
No comments:
Post a Comment