Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Management / IisTraceWebEventProvider.cs / 1305376 / IisTraceWebEventProvider.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Management { using System.Configuration; using System.Configuration.Provider; using System.Collections.Specialized; using System.Web.Util; using System.Web.Hosting; using System.Security.Permissions; //////////// // Events //////////// public sealed class IisTraceWebEventProvider : WebEventProvider { public IisTraceWebEventProvider() { // only supported on IIS version 7 and later HttpContext context = HttpContext.Current; if (context != null) { if (!HttpRuntime.UseIntegratedPipeline && !(context.WorkerRequest is ISAPIWorkerRequestInProcForIIS7)) { throw new PlatformNotSupportedException(SR.GetString(SR.Requires_Iis_7)); } } } public override void Initialize(string name, NameValueCollection config) { Debug.Trace("IisTraceWebEventProvider", "Initializing: name=" + name); base.Initialize(name, config); ProviderUtil.CheckUnrecognizedAttributes(config, name); } public override void ProcessEvent(WebBaseEvent eventRaised) { HttpContext context = HttpContext.Current; if (context != null) { context.WorkerRequest.RaiseTraceEvent(eventRaised); } } public override void Flush() { } public override void Shutdown() { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Management { using System.Configuration; using System.Configuration.Provider; using System.Collections.Specialized; using System.Web.Util; using System.Web.Hosting; using System.Security.Permissions; //////////// // Events //////////// public sealed class IisTraceWebEventProvider : WebEventProvider { public IisTraceWebEventProvider() { // only supported on IIS version 7 and later HttpContext context = HttpContext.Current; if (context != null) { if (!HttpRuntime.UseIntegratedPipeline && !(context.WorkerRequest is ISAPIWorkerRequestInProcForIIS7)) { throw new PlatformNotSupportedException(SR.GetString(SR.Requires_Iis_7)); } } } public override void Initialize(string name, NameValueCollection config) { Debug.Trace("IisTraceWebEventProvider", "Initializing: name=" + name); base.Initialize(name, config); ProviderUtil.CheckUnrecognizedAttributes(config, name); } public override void ProcessEvent(WebBaseEvent eventRaised) { HttpContext context = HttpContext.Current; if (context != null) { context.WorkerRequest.RaiseTraceEvent(eventRaised); } } public override void Flush() { } public override void Shutdown() { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConnectionProviderAttribute.cs
- TransactionChannelFaultConverter.cs
- SystemResourceKey.cs
- MissingFieldException.cs
- SHA256Managed.cs
- DbgUtil.cs
- ImageField.cs
- Select.cs
- MulticastIPAddressInformationCollection.cs
- IntSecurity.cs
- _ScatterGatherBuffers.cs
- DbCommandDefinition.cs
- CompareValidator.cs
- ToolStripContentPanel.cs
- PopupControlService.cs
- VisualTreeHelper.cs
- PropertyInfoSet.cs
- CodeObjectCreateExpression.cs
- XPathDocument.cs
- InvokeMethodActivityDesigner.cs
- EdmRelationshipRoleAttribute.cs
- CommandDesigner.cs
- ItemsChangedEventArgs.cs
- X509Certificate2.cs
- DataGridViewDataConnection.cs
- CharacterHit.cs
- RoleManagerSection.cs
- LinearKeyFrames.cs
- XamlParser.cs
- ColumnWidthChangingEvent.cs
- MsmqInputChannelBase.cs
- RefreshEventArgs.cs
- BitmapPalette.cs
- CommonDialog.cs
- ServiceDescriptionData.cs
- StringSource.cs
- RawStylusInputReport.cs
- Comparer.cs
- ScriptingSectionGroup.cs
- DataGridCaption.cs
- Animatable.cs
- AsyncStreamReader.cs
- DynamicFilter.cs
- ValidatedControlConverter.cs
- ViewEventArgs.cs
- DnsElement.cs
- DataGridBoundColumn.cs
- NgenServicingAttributes.cs
- FormViewUpdateEventArgs.cs
- BadImageFormatException.cs
- XmlCodeExporter.cs
- InfoCardConstants.cs
- WebPartHelpVerb.cs
- BinaryUtilClasses.cs
- Material.cs
- PnrpPermission.cs
- FontWeight.cs
- iisPickupDirectory.cs
- DependencyObjectProvider.cs
- ParserOptions.cs
- EffectiveValueEntry.cs
- BooleanFunctions.cs
- DbProviderFactoriesConfigurationHandler.cs
- BinaryObjectWriter.cs
- UpDownEvent.cs
- TextureBrush.cs
- COM2Properties.cs
- ResourceManager.cs
- CounterCreationData.cs
- smtpconnection.cs
- ExpandableObjectConverter.cs
- RedirectionProxy.cs
- FileDialog.cs
- ShapeTypeface.cs
- GPPOINT.cs
- SqlDataSourceFilteringEventArgs.cs
- ControlDesigner.cs
- HandlerWithFactory.cs
- XmlSerializationWriter.cs
- TraceInternal.cs
- SimpleParser.cs
- ServiceReference.cs
- SizeFConverter.cs
- HttpHandlerAction.cs
- WebEventTraceProvider.cs
- SystemIdentity.cs
- DeleteIndexBinder.cs
- NullRuntimeConfig.cs
- AddInContractAttribute.cs
- URL.cs
- TableLayoutColumnStyleCollection.cs
- ObjectIDGenerator.cs
- ExpandCollapsePattern.cs
- DrawItemEvent.cs
- WebPartConnectionsDisconnectVerb.cs
- WebPartCatalogCloseVerb.cs
- UnsafeNativeMethodsTablet.cs
- AnalyzedTree.cs
- DBCommand.cs
- ComPlusThreadInitializer.cs