Security exception when writting to an EventLog from an ASP.NET MVC application
I have a library that I created with some business logic that includes writing to a System.Diagnostics.EventLog instance. The library is normally called from a Windows Service application, but now I'm trying to call those same library functions from my ASP.NET MVC application. I tried this code inside my controller to create the EventLog instance that I pass into the method that needs to write to the log. Dim log = New EventLog("Application", My.Computer.Name, "MyMVCApp") The following error is generated when the code within the library method tries to write to the log: [SecurityException: