Assume that you have configured the SPS Site to be working under following conditions.
- "NT AUTHORITY\Authenticated Users" users as Reader on the portal,
- Web.Config for the particular Portal is marked as <identity impersonate="true" />
try
{
}
catch(Exception e)
{
System.Security.Principal.WindowsImpersonationContext wic =
// make impersonation = false in the code.
System.Security.Principal.WindowsIdentity.Impersonate
(IntPtr.Zero);
// again roll back the Impersonation = true
ExceptionManager.Publish(e);
wic.Undo();
} Basically what you are doing is doing is <identity impersonate="false"/> in the code for publishing exception, so the exception is published by the Exception Manager with the user under which the AppPool of the SPS WebSite is running. (Provided that the AppPool Identity is having "Admin Access" on the machine to Publish Exception in Event Viewer.)
Join the conversation! Your thoughts help the community grow.