We have a legacy web application (VS 2005/.Net Framework 2.0) that consumes couple of web services and recently moved to IIS 7.5 and their identity set to "ApplicationPoolIdentity''. In the code we are creating custom log [Ex:
EventLog.CreateEventSource("myApp", "myAppLog");] and if any errors it will fill the error entries into custom log in the Event viewer.
When I try to run the application and getting an exception at EventLog.CreateEventSource("myApp", "myAppLog"). It seems the application do not have appropriate permissions and unable to create "custom log" in the Event viewer.
Q1)I changed Application Pool 's identity from "ApplicationPoolIdentity "to "NetworkService" for the web applciation and web services but still getting the same exception at the code for the creation of custom log.
Q2)Because of the above error at creation of custom log, I have manually created custom log with same name in the event viewer but now getting different exception at creation of folder
Any idea how can I fix above 2 issues (Creation of custom log in the event viewer and creation of folder ) ?
The above 2 issues seems to be issue with App pool permissions.