kamagra how much to take

Remember to Elevate For Event Log Entries

Remember if you are logging errors to the system event log when developing your SharePoint application code you need to commonly promote the privileges that it is occurring under. Below is a common line that you can use in your catch blocks that gives you pretty much all the information you could want about an exception object:

  1. SPSecurity.RunWithElevatedPrivileges(delegate { EventLog.WriteEntry(Your WebPart Name, string.Concat(new object[] { "Exception in Function: ", ex.Message, " Inner Excpetion: ", ex.InnerException, "Call Stack: ", ex.StackTrace }), EventLogEntryType.Error); });

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>