vijayamadhavareddy / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

Security exception Elmah.AccessErrorLog in a Medium Trust #323

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure an ASP.net 4.0 web site with <trust level="Medium" />
2. Add Elmah
3. Configure Elmah AccessErrorLog

For obvious security reason I copied a precreated Elmah.MDB file into the 
App_Data folder.

but during elmah initialisation the system throw the following Security 
Exception:

Stack Trace: 

[SecurityException: Request failed.]
   Elmah.AccessErrorLog.InitializeDatabase() +0
   Elmah.AccessErrorLog..ctor(IDictionary config) +59

Version Information: 
Microsoft .NET Framework Version:4.0.30319; 
ASP.NET Version:4.0.30319.272

Original issue reported on code.google.com by damiano....@gmail.com on 2 Jan 2013 at 11:10

GoogleCodeExporter commented 9 years ago
I think the promlem is 

ProcessStartInfo psi = new ProcessStartInfo("cscript", "\"" + scriptPath + "\" 
\"" + dbFilePath + "\" //B //NoLogo");

see

http://msdn.microsoft.com/it-it/library/system.diagnostics.processstartinfo(v=vs
.100).aspx

Original comment by damiano....@gmail.com on 2 Jan 2013 at 1:54