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)); }
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) { 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)); }
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_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_ViewStateException_information")); formatter.IndentationLevel++; formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", this._viewStateException.Message)); formatter.IndentationLevel--; }
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)); }
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) { 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)); }
internal static string MessageFromEventCode(int eventCode, int eventDetailCode) { string str = null; string str2 = null; if (eventDetailCode != 0) { switch (eventDetailCode) { case 0xc351: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownUnknown"); break; case 0xc352: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownHostingEnvironment"); break; case 0xc353: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownChangeInGlobalAsax"); break; case 0xc354: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownConfigurationChange"); break; case 0xc355: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownUnloadAppDomainCalled"); break; case 0xc356: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownChangeInSecurityPolicyFile"); break; case 0xc357: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownBinDirChangeOrDirectoryRename"); break; case 0xc358: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownBrowsersDirChangeOrDirectoryRename"); break; case 0xc359: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownCodeDirChangeOrDirectoryRename"); break; case 0xc35a: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownResourcesDirChangeOrDirectoryRename"); break; case 0xc35b: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownIdleTimeout"); break; case 0xc35c: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownPhysicalApplicationPathChanged"); break; case 0xc35d: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownHttpRuntimeClose"); break; case 0xc35e: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownInitializationError"); break; case 0xc35f: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownMaxRecompilationsReached"); break; case 0xc360: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_StateServerConnectionError"); break; case 0xc361: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ApplicationShutdownBuildManagerChange"); break; case 0xc419: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_InvalidTicketFailure"); break; case 0xc41a: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_ExpiredTicketFailure"); break; case 0xc41b: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_InvalidViewStateMac"); break; case 0xc41c: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_InvalidViewState"); break; case 0xc47d: str2 = WebBaseEvent.FormatResourceStringWithCache("Webevent_detail_SqlProviderEventsDropped"); break; } } switch (eventCode) { case 0x3e9: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_ApplicationStart"); break; case 0x3ea: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_ApplicationShutdown"); break; case 0x3eb: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_ApplicationCompilationStart"); break; case 0x3ec: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_ApplicationCompilationEnd"); break; case 0x3ed: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_ApplicationHeartbeat"); break; case 0x7d1: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_RequestTransactionComplete"); break; case 0x7d2: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_RequestTransactionAbort"); break; case 0xbb9: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_RuntimeErrorRequestAbort"); break; case 0xbba: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_RuntimeErrorViewStateFailure"); break; case 0xbbb: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_RuntimeErrorValidationFailure"); break; case 0xbbc: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_RuntimeErrorPostTooLarge"); break; case 0xbbd: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_RuntimeErrorUnhandledException"); break; case 0xbbe: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_WebErrorParserError"); break; case 0xbbf: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_WebErrorCompilationError"); break; case 0xbc0: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_WebErrorConfigurationError"); break; case 0xfa1: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditFormsAuthenticationSuccess"); break; case 0xfa2: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditMembershipAuthenticationSuccess"); break; case 0xfa3: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditUrlAuthorizationSuccess"); break; case 0xfa4: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditFileAuthorizationSuccess"); break; case 0xfa5: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditFormsAuthenticationFailure"); break; case 0xfa6: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditMembershipAuthenticationFailure"); break; case 0xfa7: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditUrlAuthorizationFailure"); break; case 0xfa8: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditFileAuthorizationFailure"); break; case 0xfa9: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditInvalidViewStateFailure"); break; case 0xfaa: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditUnhandledSecurityException"); break; case 0xfab: str = WebBaseEvent.FormatResourceStringWithCache("Webevent_msg_AuditUnhandledAccessException"); break; default: return(string.Empty); } if (str2 != null) { str = str + " " + str2; } return(str); }
internal static string MessageFromEventCode(int eventCode, int eventDetailCode) { string msg = null; string detailMsg = null; if (eventDetailCode != 0) { switch (eventDetailCode) { case ApplicationShutdownUnknown: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownUnknown); break; case ApplicationShutdownHostingEnvironment: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownHostingEnvironment); break; case ApplicationShutdownChangeInGlobalAsax: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownChangeInGlobalAsax); break; case ApplicationShutdownConfigurationChange: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownConfigurationChange); break; case ApplicationShutdownUnloadAppDomainCalled: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownUnloadAppDomainCalled); break; case ApplicationShutdownChangeInSecurityPolicyFile: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownChangeInSecurityPolicyFile); break; case ApplicationShutdownBinDirChangeOrDirectoryRename: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownBinDirChangeOrDirectoryRename); break; case ApplicationShutdownBrowsersDirChangeOrDirectoryRename: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownBrowsersDirChangeOrDirectoryRename); break; case ApplicationShutdownCodeDirChangeOrDirectoryRename: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownCodeDirChangeOrDirectoryRename); break; case ApplicationShutdownResourcesDirChangeOrDirectoryRename: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownResourcesDirChangeOrDirectoryRename); break; case ApplicationShutdownIdleTimeout: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownIdleTimeout); break; case ApplicationShutdownPhysicalApplicationPathChanged: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownPhysicalApplicationPathChanged); break; case ApplicationShutdownHttpRuntimeClose: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownHttpRuntimeClose); break; case ApplicationShutdownInitializationError: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownInitializationError); break; case ApplicationShutdownMaxRecompilationsReached: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownMaxRecompilationsReached); break; case ApplicationShutdownBuildManagerChange: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ApplicationShutdownBuildManagerChange); break; case StateServerConnectionError: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_StateServerConnectionError); break; case InvalidTicketFailure: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_InvalidTicketFailure); break; case ExpiredTicketFailure: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_ExpiredTicketFailure); break; case InvalidViewStateMac: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_InvalidViewStateMac); break; case InvalidViewState: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_InvalidViewState); break; case SqlProviderEventsDropped: detailMsg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_detail_SqlProviderEventsDropped); break; default: break; } } switch (eventCode) { case ApplicationStart: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_ApplicationStart); break; case ApplicationShutdown: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_ApplicationShutdown); break; case ApplicationCompilationStart: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_ApplicationCompilationStart); break; case ApplicationCompilationEnd: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_ApplicationCompilationEnd); break; case ApplicationHeartbeat: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_ApplicationHeartbeat); break; case RequestTransactionComplete: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_RequestTransactionComplete); break; case RequestTransactionAbort: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_RequestTransactionAbort); break; case RuntimeErrorRequestAbort: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_RuntimeErrorRequestAbort); break; case RuntimeErrorViewStateFailure: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_RuntimeErrorViewStateFailure); break; case RuntimeErrorValidationFailure: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_RuntimeErrorValidationFailure); break; case RuntimeErrorPostTooLarge: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_RuntimeErrorPostTooLarge); break; case RuntimeErrorUnhandledException: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_RuntimeErrorUnhandledException); break; case WebErrorParserError: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_WebErrorParserError); break; case WebErrorCompilationError: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_WebErrorCompilationError); break; case WebErrorConfigurationError: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_WebErrorConfigurationError); break; case AuditUnhandledSecurityException: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditUnhandledSecurityException); break; case AuditInvalidViewStateFailure: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditInvalidViewStateFailure); break; case AuditFormsAuthenticationSuccess: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditFormsAuthenticationSuccess); break; case AuditUrlAuthorizationSuccess: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditUrlAuthorizationSuccess); break; case AuditFileAuthorizationFailure: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditFileAuthorizationFailure); break; case AuditFormsAuthenticationFailure: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditFormsAuthenticationFailure); break; case AuditFileAuthorizationSuccess: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditFileAuthorizationSuccess); break; case AuditMembershipAuthenticationSuccess: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditMembershipAuthenticationSuccess); break; case AuditMembershipAuthenticationFailure: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditMembershipAuthenticationFailure); break; case AuditUrlAuthorizationFailure: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditUrlAuthorizationFailure); break; case AuditUnhandledAccessException: msg = WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_msg_AuditUnhandledAccessException); break; default: Debug.Assert(false, "ASP.NET event code " + eventCode.ToString(CultureInfo.InvariantCulture) + " doesn't have message string mapped to it"); return(String.Empty); } if (detailMsg != null) { msg += " " + detailMsg; } return(msg); }