internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     if (this._exception != null)
     {
         Exception innerException = this._exception;
         for (int i = 0; (innerException != null) && (i <= 2); i++)
         {
             formatter.AppendLine(string.Empty);
             if (i == 0)
             {
                 formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_information"));
             }
             else
             {
                 formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_inner_exception_information", i.ToString(CultureInfo.InstalledUICulture)));
             }
             formatter.IndentationLevel++;
             formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_type", innerException.GetType().ToString()));
             formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", innerException.Message));
             formatter.IndentationLevel--;
             innerException = innerException.InnerException;
         }
     }
 }
        public void FormatToString(WebEventFormatter formatter)
        {
            string name;
            string authenticationType;
            bool   isAuthenticated;

            if (this.Principal == null)
            {
                name = string.Empty;
                authenticationType = string.Empty;
                isAuthenticated    = false;
            }
            else
            {
                IIdentity identity = this.Principal.Identity;
                name               = identity.Name;
                isAuthenticated    = identity.IsAuthenticated;
                authenticationType = identity.AuthenticationType;
            }
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_url", this.RequestUrl));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_path", this.RequestPath));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user_host_address", this.UserHostAddress));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user", name));
            if (isAuthenticated)
            {
                formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_authenticated"));
            }
            else
            {
                formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_authenticated"));
            }
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_authentication_type", authenticationType));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName));
        }
 public void FormatToString(WebEventFormatter formatter)
 {
     string name;
     string authenticationType;
     bool isAuthenticated;
     if (this.Principal == null)
     {
         name = string.Empty;
         authenticationType = string.Empty;
         isAuthenticated = false;
     }
     else
     {
         IIdentity identity = this.Principal.Identity;
         name = identity.Name;
         isAuthenticated = identity.IsAuthenticated;
         authenticationType = identity.AuthenticationType;
     }
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_url", this.RequestUrl));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_path", this.RequestPath));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user_host_address", this.UserHostAddress));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user", name));
     if (isAuthenticated)
     {
         formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_authenticated"));
     }
     else
     {
         formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_authenticated"));
     }
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_authentication_type", authenticationType));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName));
 }
        private void FillBasicWmiDataFields(ref UnsafeNativeMethods.WmiData wmiData, WebBaseEvent eventRaised)
        {
            WebApplicationInformation applicationInformation = WebBaseEvent.ApplicationInformation;

            wmiData.eventType       = (int)WebBaseEvent.WebEventTypeFromWebEvent(eventRaised);
            wmiData.eventCode       = eventRaised.EventCode;
            wmiData.eventDetailCode = eventRaised.EventDetailCode;
            wmiData.eventTime       = this.WmiFormatTime(eventRaised.EventTime);
            wmiData.eventMessage    = eventRaised.Message;
            wmiData.sequenceNumber  = eventRaised.EventSequence.ToString(CultureInfo.InstalledUICulture);
            wmiData.occurrence      = eventRaised.EventOccurrence.ToString(CultureInfo.InstalledUICulture);
            wmiData.eventId         = eventRaised.EventID.ToString("N", CultureInfo.InstalledUICulture);
            wmiData.appDomain       = applicationInformation.ApplicationDomain;
            wmiData.trustLevel      = applicationInformation.TrustLevel;
            wmiData.appVirtualPath  = applicationInformation.ApplicationVirtualPath;
            wmiData.appPath         = applicationInformation.ApplicationPath;
            wmiData.machineName     = applicationInformation.MachineName;
            if (eventRaised.IsSystemEvent)
            {
                wmiData.details = string.Empty;
            }
            else
            {
                WebEventFormatter formatter = new WebEventFormatter();
                eventRaised.FormatCustomEventDetails(formatter);
                wmiData.details = formatter.ToString();
            }
        }
        public override string ToString()
        {
            WebEventFormatter formatter = new WebEventFormatter();

            this.FormatToString(formatter);
            return(formatter.ToString());
        }
Example #6
0
        public override void FormatCustomEventDetails(WebEventFormatter formatter)
        {
            base.FormatCustomEventDetails(formatter);

            formatter.AppendLine("User Name: " + _user.Username);
            formatter.AppendLine("Culture: " + _culture);
        }
Example #7
0
        private void AddBasicDataFields(ArrayList dataFields, WebBaseEvent eventRaised)
        {
            WebApplicationInformation applicationInformation = WebBaseEvent.ApplicationInformation;

            dataFields.Add(eventRaised.EventCode.ToString(CultureInfo.InstalledUICulture));
            dataFields.Add(eventRaised.Message);
            dataFields.Add(eventRaised.EventTime.ToString());
            dataFields.Add(eventRaised.EventTimeUtc.ToString());
            dataFields.Add(eventRaised.EventID.ToString("N", CultureInfo.InstalledUICulture));
            dataFields.Add(eventRaised.EventSequence.ToString(CultureInfo.InstalledUICulture));
            dataFields.Add(eventRaised.EventOccurrence.ToString(CultureInfo.InstalledUICulture));
            dataFields.Add(eventRaised.EventDetailCode.ToString(CultureInfo.InstalledUICulture));
            dataFields.Add(applicationInformation.ApplicationDomain);
            dataFields.Add(applicationInformation.TrustLevel);
            dataFields.Add(applicationInformation.ApplicationVirtualPath);
            dataFields.Add(applicationInformation.ApplicationPath);
            dataFields.Add(applicationInformation.MachineName);
            if (eventRaised.IsSystemEvent)
            {
                dataFields.Add(null);
            }
            else
            {
                WebEventFormatter formatter = new WebEventFormatter();
                eventRaised.FormatCustomEventDetails(formatter);
                dataFields.Add(formatter.ToString());
            }
        }
 private void AddBasicDataFields(ArrayList dataFields, WebBaseEvent eventRaised)
 {
     WebApplicationInformation applicationInformation = WebBaseEvent.ApplicationInformation;
     dataFields.Add(eventRaised.EventCode.ToString(CultureInfo.InstalledUICulture));
     dataFields.Add(eventRaised.Message);
     dataFields.Add(eventRaised.EventTime.ToString());
     dataFields.Add(eventRaised.EventTimeUtc.ToString());
     dataFields.Add(eventRaised.EventID.ToString("N", CultureInfo.InstalledUICulture));
     dataFields.Add(eventRaised.EventSequence.ToString(CultureInfo.InstalledUICulture));
     dataFields.Add(eventRaised.EventOccurrence.ToString(CultureInfo.InstalledUICulture));
     dataFields.Add(eventRaised.EventDetailCode.ToString(CultureInfo.InstalledUICulture));
     dataFields.Add(applicationInformation.ApplicationDomain);
     dataFields.Add(applicationInformation.TrustLevel);
     dataFields.Add(applicationInformation.ApplicationVirtualPath);
     dataFields.Add(applicationInformation.ApplicationPath);
     dataFields.Add(applicationInformation.MachineName);
     if (eventRaised.IsSystemEvent)
     {
         dataFields.Add(null);
     }
     else
     {
         WebEventFormatter formatter = new WebEventFormatter();
         eventRaised.FormatCustomEventDetails(formatter);
         dataFields.Add(formatter.ToString());
     }
 }
Example #9
0
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     if (this._exception != null)
     {
         Exception innerException = this._exception;
         for (int i = 0; (innerException != null) && (i <= 2); i++)
         {
             formatter.AppendLine(string.Empty);
             if (i == 0)
             {
                 formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_information"));
             }
             else
             {
                 formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_inner_exception_information", i.ToString(CultureInfo.InstalledUICulture)));
             }
             formatter.IndentationLevel++;
             formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_type", innerException.GetType().ToString()));
             formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", innerException.Message));
             formatter.IndentationLevel--;
             innerException = innerException.InnerException;
         }
     }
 }
        /// <summary>   Format custom event details.  Calls the base method and then adds the exception on a new line. </summary>
        /// <remarks>   ebrown, 11/10/2010. </remarks>
        /// <exception cref="ArgumentNullException">    Thrown when one or more required arguments are null. </exception>
        /// <param name="formatter">    The formatter. </param>
        public override void FormatCustomEventDetails(WebEventFormatter formatter)
        {
            if (null == formatter) { throw new ArgumentNullException("formatter"); }

            base.FormatCustomEventDetails(formatter);
            formatter.AppendLine(_exception.ToString());
        }
 public void FormatToString(WebEventFormatter formatter)
 {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_domain", this.ApplicationDomain));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_trust_level", this.TrustLevel));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_virtual_path", this.ApplicationVirtualPath));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_path", this.ApplicationPath));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_machine_name", this.MachineName));
 }
Example #12
0
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_statistics"));
     formatter.IndentationLevel++;
     s_procStats.FormatToString(formatter);
     formatter.IndentationLevel--;
 }
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_statistics"));
     formatter.IndentationLevel++;
     s_procStats.FormatToString(formatter);
     formatter.IndentationLevel--;
 }
Example #14
0
 // Formats Web request event information.
 // This method is invoked indirectly by the provider using one of the
 // overloaded ToString methods. If buffering is enabled, this method is
 // called asynchronously on a non-Web request thread, where the
 // HttpContext is not available.
 public override void FormatCustomEventDetails(WebEventFormatter formatter)
 {
     base.FormatCustomEventDetails(formatter);
     formatter.AppendLine(">>User ID: " + userID);
     formatter.AppendLine(">>Authentication Type: " + authType);
     formatter.AppendLine(">>User Authenticated: " +
                           isAuthenticated.ToString());
     formatter.AppendLine(">>Activity Description: Critical Operation");
 }
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_information"));
     formatter.IndentationLevel++;
     this.RequestInformation.FormatToString(formatter);
     formatter.IndentationLevel--;
 }
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_ViewStateException_information"));
     formatter.IndentationLevel++;
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", this._viewStateException.Message));
     formatter.IndentationLevel--;
 }
Example #17
0
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_information"));
     formatter.IndentationLevel++;
     this.RequestInformation.FormatToString(formatter);
     formatter.IndentationLevel--;
 }
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_ViewStateException_information"));
     formatter.IndentationLevel++;
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", this._viewStateException.Message));
     formatter.IndentationLevel--;
 }
        public override void FormatCustomEventDetails(WebEventFormatter formatter)
        {
			if (ajaxProcessor != null)
			{
				MethodInfo methodInfo = ajaxProcessor.AjaxMethod;
				object[] paremeters = ajaxProcessor.RetreiveParameters();
				string str = string.Format("TargetSite: {0}", exception.TargetSite);

				formatter.AppendLine(str);
				formatter.AppendLine("");

				if (System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"] != null)
				{
					formatter.AppendLine("JSON: " + System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"].ToString());
					formatter.AppendLine("");
				}

				str = string.Format(Constant.AjaxID + " Method: {0}.{1}", methodInfo.ReflectedType.ToString(), methodInfo.Name);

				formatter.AppendLine(str);
				formatter.AppendLine("");

				if (this.parameters != null)
				{
					foreach (object o in this.parameters)
					{
						formatter.AppendLine(string.Format("Parameter: {0}", o));
					}

					formatter.AppendLine("");
				}

				formatter.AppendLine("StrackTrace:");
				formatter.AppendLine(exception.StackTrace);
			}
			else
			{
				string str = string.Format("TargetSite: {0}", exception.TargetSite);

				formatter.AppendLine(str);
				formatter.AppendLine("");

				if (System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"] != null)
				{
					formatter.AppendLine("JSON: " + System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"].ToString());
					formatter.AppendLine("");
				}

				formatter.AppendLine("StrackTrace:");
				formatter.AppendLine(exception.StackTrace);
			}

            base.FormatCustomEventDetails(formatter);
        }
 public virtual void FormatToString(WebEventFormatter formatter)
 {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_start_time", this.ProcessStartTime.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_count", this.ThreadCount.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_working_set", this.WorkingSet.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_peak_working_set", this.PeakWorkingSet.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_managed_heap_size", this.ManagedHeapSize.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_domain_count", this.AppDomainCount.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_requests_executing", this.RequestsExecuting.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_queued", this.RequestsQueued.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_rejected", this.RequestsRejected.ToString(CultureInfo.InstalledUICulture)));
 }
Example #21
0
        /// <summary>
        /// Formats the event information for the provider.
        /// </summary>
        /// <param name="formatter">Standard formatter for health monitoring events.</param>
        public override void FormatCustomEventDetails(System.Web.Management.WebEventFormatter formatter)
        {
            //Format our custom event information.
            formatter.AppendLine(String.Empty);

            formatter.AppendLine("*** Start of custom event information");

            formatter.AppendLine(msgCreated);
            formatter.AppendLine(msgRaised);

            formatter.AppendLine("*** End of custom event information");
        }
 public virtual void FormatToString(WebEventFormatter formatter)
 {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_start_time", this.ProcessStartTime.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_count", this.ThreadCount.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_working_set", this.WorkingSet.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_peak_working_set", this.PeakWorkingSet.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_managed_heap_size", this.ManagedHeapSize.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_domain_count", this.AppDomainCount.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_requests_executing", this.RequestsExecuting.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_queued", this.RequestsQueued.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_rejected", this.RequestsRejected.ToString(CultureInfo.InstalledUICulture)));
 }
 public void FormatToString(WebEventFormatter formatter)
 {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_id", this.ThreadID.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName));
     if (this.IsImpersonating)
     {
         formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_impersonating"));
     }
     else
     {
         formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_impersonating"));
     }
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_stack_trace", this.StackTrace));
 }
Example #24
0
 public void FormatToString(WebEventFormatter formatter)
 {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_id", this.ThreadID.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName));
     if (this.IsImpersonating)
     {
         formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_impersonating"));
     }
     else
     {
         formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_impersonating"));
     }
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_stack_trace", this.StackTrace));
 }
Example #25
0
        public virtual string ToString(bool includeAppInfo, bool includeCustomEventDetails)
        {
            WebEventFormatter formatter = new WebEventFormatter();

            this.FormatToString(formatter, includeAppInfo);
            if (!this.IsSystemEvent && includeCustomEventDetails)
            {
                formatter.AppendLine(string.Empty);
                formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_custom_event_details"));
                formatter.IndentationLevel++;
                this.FormatCustomEventDetails(formatter);
                formatter.IndentationLevel--;
            }
            return(formatter.ToString());
        }
        // Formats critical transaction event information..
        public override void FormatCustomEventDetails(WebEventFormatter formatter)
        {
            base.FormatCustomEventDetails(formatter);

            // Add custom data.
            formatter.AppendLine("");

            formatter.IndentationLevel += 1;
            formatter.AppendLine("** CriticalTransactionEvent Start **");

            formatter.AppendLine(eventInfo.ToString());

            formatter.AppendLine("** CriticalTransactionEvent End **");

            formatter.IndentationLevel -= 1;
        }
Example #27
0
 internal virtual void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_code", this.EventCode.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_message", this.Message));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time", this.EventTime.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time_Utc", this.EventTimeUtc.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_id", this.EventID.ToString("N", CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_sequence", this.EventSequence.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_occurrence", this.EventOccurrence.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_detail_code", this.EventDetailCode.ToString(CultureInfo.InstalledUICulture)));
     if (includeAppInfo)
     {
         formatter.AppendLine(string.Empty);
         formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_application_information"));
         formatter.IndentationLevel++;
         ApplicationInformation.FormatToString(formatter);
         formatter.IndentationLevel--;
     }
 }
        public override void FormatCustomEventDetails(WebEventFormatter formatter)
        {
            base.FormatCustomEventDetails(formatter);

            formatter.AppendLine("");

            formatter.IndentationLevel += 1;
            formatter.AppendLine(
                "* mojoWebAuthenticationFailureAuditEvent Start *");
            formatter.AppendLine(string.Format("Request path: {0}",
                RequestInformation.RequestPath));
            formatter.AppendLine(string.Format("Request Url: {0}",
                RequestInformation.RequestUrl));

            formatter.AppendLine(customCreatedMsg);
            formatter.AppendLine(customRaisedMsg);

            formatter.AppendLine(
                "* mojoWebAuthenticationFailureAuditEvent End *");

            formatter.IndentationLevel -= 1;
        }
Example #29
0
        public void FormatToString(WebEventFormatter formatter) {
            string      user;
            string      authType;
            bool        authed;

            if (Principal == null) {
                user = String.Empty;
                authType = String.Empty;
                authed = false;
            }
            else {
                IIdentity    id = Principal.Identity;

                user = id.Name;
                authed = id.IsAuthenticated;
                authType = id.AuthenticationType;
            }

            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_request_url, RequestUrl));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_request_path, RequestPath));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_user_host_address, UserHostAddress));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_user, user));

            if (authed) {
                formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_is_authenticated));
            }
            else {
                formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_is_not_authenticated));
            }
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_authentication_type, authType));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_thread_account_name, ThreadAccountName));

        }
 public virtual new void FormatToString(WebEventFormatter formatter)
 {
 }
Example #31
0
 public virtual void FormatCustomEventDetails(WebEventFormatter formatter)
 {
 }
Example #32
0
        virtual internal void FormatToString(WebEventFormatter formatter, bool includeAppInfo) {
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_code, EventCode.ToString(CultureInfo.InstalledUICulture)));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_message, Message));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_time, EventTime.ToString(CultureInfo.InstalledUICulture)));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_time_Utc, EventTimeUtc.ToString(CultureInfo.InstalledUICulture)));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_id, EventID.ToString("N", CultureInfo.InstalledUICulture)));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_sequence, EventSequence.ToString(CultureInfo.InstalledUICulture)));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_occurrence, EventOccurrence.ToString(CultureInfo.InstalledUICulture)));
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_detail_code, EventDetailCode.ToString(CultureInfo.InstalledUICulture)));

            if (includeAppInfo) {
                formatter.AppendLine(String.Empty);
                formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_information));
                formatter.IndentationLevel += 1;
                ApplicationInformation.FormatToString(formatter);
                formatter.IndentationLevel -= 1;
            }
        }
Example #33
0
        override internal void FormatToString(WebEventFormatter formatter, bool includeAppInfo) {
            base.FormatToString(formatter, includeAppInfo);

            formatter.AppendLine(String.Empty);
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_ViewStateException_information));
            formatter.IndentationLevel += 1;
            formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_exception_message, _viewStateException.Message));

            formatter.IndentationLevel -= 1;
        }
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_name_to_authenticate", this._nameToAuthenticate));
 }
 public void FormatToString(WebEventFormatter formatter)
 {
 }
Example #36
0
        public override string ToString() {
            WebEventFormatter formatter = new WebEventFormatter();

            FormatToString(formatter);
            return formatter.ToString();
        }
 public void FormatToString(WebEventFormatter formatter)
 {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_id", this.ProcessID.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_name", this.ProcessName));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_account_name", this.AccountName));
 }
 public virtual new void FormatToString(WebEventFormatter formatter)
 {
 }
 public virtual void FormatCustomEventDetails(WebEventFormatter formatter)
 {
 }
 public override void FormatCustomEventDetails(WebEventFormatter formatter)
 {
     formatter.AppendLine(_sb.ToString());
     base.FormatCustomEventDetails(formatter);
 }
 internal virtual void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_code", this.EventCode.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_message", this.Message));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time", this.EventTime.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time_Utc", this.EventTimeUtc.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_id", this.EventID.ToString("N", CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_sequence", this.EventSequence.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_occurrence", this.EventOccurrence.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_detail_code", this.EventDetailCode.ToString(CultureInfo.InstalledUICulture)));
     if (includeAppInfo)
     {
         formatter.AppendLine(string.Empty);
         formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_application_information"));
         formatter.IndentationLevel++;
         ApplicationInformation.FormatToString(formatter);
         formatter.IndentationLevel--;
     }
 }
Example #42
0
 public void FormatToString(WebEventFormatter formatter)
 {
 }
 public void FormatToString(WebEventFormatter formatter)
 {
     throw new NotImplementedException();
 }
Example #44
0
 public virtual void FormatCustomEventDetails (WebEventFormatter formatter)
 {
         throw new NotImplementedException ();
 }
 public void FormatToString(WebEventFormatter formatter)
 {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_id", this.ProcessID.ToString(CultureInfo.InstalledUICulture)));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_name", this.ProcessName));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_account_name", this.AccountName));
 }
Example #46
0
 public void FormatToString(WebEventFormatter formatter) {
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_domain, ApplicationDomain));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_trust_level, TrustLevel));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_virtual_path, ApplicationVirtualPath));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_path, ApplicationPath));
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_machine_name, MachineName));
 }
Example #47
0
        public virtual string ToString(bool includeAppInfo, bool includeCustomEventDetails) {
            WebEventFormatter   formatter = new WebEventFormatter();

            FormatToString(formatter, includeAppInfo);

            if (!IsSystemEvent && includeCustomEventDetails) {
                formatter.AppendLine(String.Empty);
                formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_custom_event_details));
                formatter.IndentationLevel += 1;
                FormatCustomEventDetails(formatter);
                formatter.IndentationLevel -= 1;
            }

            return formatter.ToString();
        }
 public virtual string ToString(bool includeAppInfo, bool includeCustomEventDetails)
 {
     WebEventFormatter formatter = new WebEventFormatter();
     this.FormatToString(formatter, includeAppInfo);
     if (!this.IsSystemEvent && includeCustomEventDetails)
     {
         formatter.AppendLine(string.Empty);
         formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_custom_event_details"));
         formatter.IndentationLevel++;
         this.FormatCustomEventDetails(formatter);
         formatter.IndentationLevel--;
     }
     return formatter.ToString();
 }
 public void FormatToString (WebEventFormatter formatter)
 {
         throw new NotImplementedException ();
 }
Example #50
0
 public virtual void FormatCustomEventDetails(WebEventFormatter formatter)
 {
     throw new NotImplementedException();
 }
Example #51
0
 internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo)
 {
     base.FormatToString(formatter, includeAppInfo);
     formatter.AppendLine(string.Empty);
     formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_name_to_authenticate", this._nameToAuthenticate));
 }