Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Management / IisTraceWebEventProvider.cs / 1 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- xsdvalidator.cs
- OdbcFactory.cs
- TabOrder.cs
- SubordinateTransaction.cs
- BinHexDecoder.cs
- ScaleTransform3D.cs
- HtmlInputRadioButton.cs
- CustomErrorsSection.cs
- ImageButton.cs
- InheritablePropertyChangeInfo.cs
- Line.cs
- ZoneLinkButton.cs
- SharedPersonalizationStateInfo.cs
- BindingList.cs
- TileModeValidation.cs
- WeakEventTable.cs
- Boolean.cs
- ObjectCloneHelper.cs
- Path.cs
- SafeUserTokenHandle.cs
- SQLUtility.cs
- CapiNative.cs
- OrderingQueryOperator.cs
- TraceData.cs
- HtmlElementCollection.cs
- DiscreteKeyFrames.cs
- ConfigurationPropertyCollection.cs
- IntSecurity.cs
- TemplateFactory.cs
- ScriptComponentDescriptor.cs
- DocumentXmlWriter.cs
- HttpDebugHandler.cs
- MLangCodePageEncoding.cs
- SharedStatics.cs
- Activity.cs
- ScrollData.cs
- HandlerBase.cs
- WorkflowPrinting.cs
- WhitespaceRuleLookup.cs
- XamlStream.cs
- SchemaMapping.cs
- TrackingServices.cs
- formatter.cs
- BuildProvidersCompiler.cs
- LinearGradientBrush.cs
- QueryCursorEventArgs.cs
- XamlVector3DCollectionSerializer.cs
- CompilerParameters.cs
- WebBrowserEvent.cs
- VirtualizingPanel.cs
- StructuredTypeEmitter.cs
- BuildProviderInstallComponent.cs
- SignatureDescription.cs
- SqlInfoMessageEvent.cs
- ResourceIDHelper.cs
- ArrayElementGridEntry.cs
- coordinator.cs
- ControlBindingsCollection.cs
- TraceSwitch.cs
- LicFileLicenseProvider.cs
- DataSetMappper.cs
- URIFormatException.cs
- IndexObject.cs
- GridViewColumn.cs
- NonParentingControl.cs
- DiscoveryMessageSequenceCD1.cs
- ProcessHostMapPath.cs
- Delay.cs
- ProjectionQueryOptionExpression.cs
- XmlCodeExporter.cs
- ConstNode.cs
- ProtocolsConfigurationHandler.cs
- MessageProtectionOrder.cs
- UMPAttributes.cs
- FixedSOMPageConstructor.cs
- DependencyProperty.cs
- MediaPlayerState.cs
- TextCompositionEventArgs.cs
- XmlSigningNodeWriter.cs
- Image.cs
- MemoryRecordBuffer.cs
- AspProxy.cs
- input.cs
- IListConverters.cs
- XmlProcessingInstruction.cs
- Panel.cs
- NestPullup.cs
- IssuanceLicense.cs
- AutomationProperties.cs
- DoubleConverter.cs
- NodeLabelEditEvent.cs
- StructuralType.cs
- FontWeights.cs
- ListItemsCollectionEditor.cs
- SolidColorBrush.cs
- MarkerProperties.cs
- ConsoleCancelEventArgs.cs
- TransformedBitmap.cs
- SelectionManager.cs
- EventLogPermissionHolder.cs