Wednesday, 31 October 2007

EPiServer System.Security.SecurityException

On application start up you get : Server Error in '/' Application.. All subsequent requests are fine until the app is restarted. The actual error details : System.Security.SecurityException: Requested registry access is not allowed After browsing the forums, it seems to be a problem when you don't install episerver in the usual manner or it was installed without admin priviledges. A quick way to solve the problem is to create a quick console app with the following code:

static void Main(string[] args)
{
   System.Diagnostics.EventLog _eventLog = new System.Diagnostics.EventLog("Application", ".", "EPiServer Scheduler");
            
   _eventLog.WriteEntry( "Installed OK");
   _eventLog.Dispose();
}
Just run once with admin user and that should be it. To check it ran OK, look in event viewer > application and you should see a message there.


1 comment:

Emil C said...

Ty. Solved the problem.