Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Management / IisTraceWebEventProvider.cs / 2 / 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 //////////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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. //------------------------------------------------------------------------------ //// 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 //////////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlObjectSerializerReadContextComplex.cs
- BaseTemplateCodeDomTreeGenerator.cs
- CustomTypeDescriptor.cs
- TextDecorationCollectionConverter.cs
- _ShellExpression.cs
- CurrencyWrapper.cs
- BufferedReadStream.cs
- ReadOnlyMetadataCollection.cs
- UIElementParagraph.cs
- OutputCacheProfile.cs
- MDIClient.cs
- ScriptServiceAttribute.cs
- BitArray.cs
- AxisAngleRotation3D.cs
- ClientFormsIdentity.cs
- ConnectionsZone.cs
- XmlSubtreeReader.cs
- WindowsGraphicsCacheManager.cs
- MachineKey.cs
- KeyValuePairs.cs
- XmlValidatingReader.cs
- UIElementIsland.cs
- XmlTextReader.cs
- CertificateManager.cs
- DrawingGroupDrawingContext.cs
- ThemeableAttribute.cs
- PropertyDescriptor.cs
- ExclusiveCanonicalizationTransform.cs
- ValidationEventArgs.cs
- CheckBoxRenderer.cs
- Method.cs
- QilTypeChecker.cs
- WaitHandle.cs
- SimpleType.cs
- DependencyPropertyAttribute.cs
- ToolStripPanelSelectionBehavior.cs
- PropertyDescriptorGridEntry.cs
- WorkflowOperationBehavior.cs
- AppDomainGrammarProxy.cs
- Encoder.cs
- LinqToSqlWrapper.cs
- Effect.cs
- ToolStripGripRenderEventArgs.cs
- TargetInvocationException.cs
- DataBoundLiteralControl.cs
- ResourceDictionaryCollection.cs
- TextWriter.cs
- Tuple.cs
- SecurityCookieModeValidator.cs
- IconConverter.cs
- FrameAutomationPeer.cs
- OleDbStruct.cs
- XmlSchemaExporter.cs
- RuleAttributes.cs
- SignedXmlDebugLog.cs
- Facet.cs
- DataGridViewRowPrePaintEventArgs.cs
- CompensationToken.cs
- SecondaryIndex.cs
- LinkUtilities.cs
- Math.cs
- Paragraph.cs
- InkPresenter.cs
- TraceUtils.cs
- glyphs.cs
- MouseButtonEventArgs.cs
- HtmlInputButton.cs
- EventMap.cs
- MsmqElementBase.cs
- DataStreamFromComStream.cs
- SoapAttributes.cs
- WindowsFormsSectionHandler.cs
- TraceContextRecord.cs
- KoreanCalendar.cs
- SchemaNames.cs
- UnSafeCharBuffer.cs
- SoapEnumAttribute.cs
- CompositeCollection.cs
- CorrelationTokenInvalidatedHandler.cs
- EntityViewGenerationConstants.cs
- WebConfigurationFileMap.cs
- TypeToken.cs
- ActionMessageFilter.cs
- ReceiveContext.cs
- OleDbTransaction.cs
- TreeNodeClickEventArgs.cs
- StoreItemCollection.cs
- StrokeCollection2.cs
- AccessedThroughPropertyAttribute.cs
- BasicAsyncResult.cs
- StyleSelector.cs
- BindingGraph.cs
- BeginStoryboard.cs
- ContextConfiguration.cs
- QueryInterceptorAttribute.cs
- CodeTypeMember.cs
- AndCondition.cs
- ArithmeticException.cs
- SymbolMethod.cs
- IItemProperties.cs