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
- XmlnsPrefixAttribute.cs
- XPathItem.cs
- Wizard.cs
- XomlCompilerHelpers.cs
- ConfigurationSchemaErrors.cs
- WebControlsSection.cs
- ValueTypeIndexerReference.cs
- WebPartDisplayModeCancelEventArgs.cs
- WorkflowMarkupElementEventArgs.cs
- ScriptHandlerFactory.cs
- PropertyChangeTracker.cs
- MsmqUri.cs
- ApplicationServicesHostFactory.cs
- SecurityKeyIdentifierClause.cs
- ExcludeFromCodeCoverageAttribute.cs
- PasswordBox.cs
- ColorContextHelper.cs
- BindValidator.cs
- PolygonHotSpot.cs
- TimelineGroup.cs
- UndoUnit.cs
- DesignerDataView.cs
- TitleStyle.cs
- GC.cs
- RectAnimationUsingKeyFrames.cs
- StandardBindingCollectionElement.cs
- WindowsPrincipal.cs
- DBSqlParser.cs
- ExpressionNode.cs
- IsolatedStorageSecurityState.cs
- Graphics.cs
- LinkButton.cs
- Rijndael.cs
- DSASignatureDeformatter.cs
- UTF32Encoding.cs
- SessionStateItemCollection.cs
- MediaSystem.cs
- PropertyEmitterBase.cs
- ImpersonateTokenRef.cs
- GridViewPageEventArgs.cs
- TableDesigner.cs
- WebPartRestoreVerb.cs
- WorkflowClientDeliverMessageWrapper.cs
- IndividualDeviceConfig.cs
- StateDesigner.LayoutSelectionGlyph.cs
- ToolboxItemFilterAttribute.cs
- CapabilitiesRule.cs
- PropertiesTab.cs
- WindowsGraphics.cs
- ApplicationBuildProvider.cs
- XmlException.cs
- PlainXmlWriter.cs
- EditorAttribute.cs
- DependencyObject.cs
- DiscreteKeyFrames.cs
- SystemIPGlobalProperties.cs
- SqlRemoveConstantOrderBy.cs
- NameSpaceExtractor.cs
- UnsafeNativeMethods.cs
- TimeSpanParse.cs
- PrintDialogException.cs
- RequestQueue.cs
- LicenseManager.cs
- FormViewModeEventArgs.cs
- AsyncOperationManager.cs
- ContextDataSourceView.cs
- DisableDpiAwarenessAttribute.cs
- DocumentEventArgs.cs
- SerializationAttributes.cs
- DesignBindingValueUIHandler.cs
- EntityContainerEmitter.cs
- DeadLetterQueue.cs
- ToolStripOverflow.cs
- HttpContextWrapper.cs
- InvalidOleVariantTypeException.cs
- EncodingNLS.cs
- InvalidWorkflowException.cs
- DesignerInterfaces.cs
- Track.cs
- ClientTargetSection.cs
- WebSysDefaultValueAttribute.cs
- EdmConstants.cs
- WebPartVerbsEventArgs.cs
- ServiceHostFactory.cs
- BackStopAuthenticationModule.cs
- CompilerParameters.cs
- MappedMetaModel.cs
- HandledMouseEvent.cs
- SamlAssertion.cs
- HttpException.cs
- CompilerGeneratedAttribute.cs
- HtmlString.cs
- SafeArrayTypeMismatchException.cs
- DocumentApplicationJournalEntryEventArgs.cs
- Composition.cs
- PenThreadWorker.cs
- OdbcCommandBuilder.cs
- PickBranch.cs
- HandleValueEditor.cs
- DataGridViewUtilities.cs