Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

4010 An unhandled security exception has occurred. IIS 8.5

I am facing an issue while trying a simple ASP.NET default application on the server. This is a fresh new server.

I get the error - 4010 An unhandled security exception has occurred.

There are no error details to it. I have seen few websites which tried to relate the error to cache, however i don't have any cache in use.

On the local machine everything seems to be working fine. Any suggestions ?

like image 876
Bablu Dutt Avatar asked Nov 26 '14 04:11

Bablu Dutt


1 Answers

I had this issue today and it was due to my asp.net application wanting to write to the Windows Event Log. The Event Source didn't exist and my application didn't have the permissions to create it so it errored with this message:

Event code: 4010 Event message: An unhandled security exception has occurred.

The fix for me was to create the Event Source and my application started working. I followed the steps from the below answer to manually create the Event Source via the command line:

How to create Windows EventLog source from command line?

like image 118
cjuk Avatar answered Oct 25 '22 10:10

cjuk