Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Helper.cs
- ClockGroup.cs
- Token.cs
- Attachment.cs
- CaseInsensitiveComparer.cs
- TransactionProxy.cs
- ThreadLocal.cs
- PixelFormats.cs
- SafeFileMappingHandle.cs
- QuerySelectOp.cs
- UIElementCollection.cs
- Events.cs
- WindowsTab.cs
- RulePatternOps.cs
- WindowsFormsLinkLabel.cs
- XPathNodeList.cs
- PropertyCollection.cs
- Form.cs
- path.cs
- DesignerSerializationVisibilityAttribute.cs
- UserInitiatedNavigationPermission.cs
- List.cs
- HttpWriter.cs
- PartialTrustVisibleAssembliesSection.cs
- Run.cs
- counter.cs
- HeaderedItemsControl.cs
- DbUpdateCommandTree.cs
- GlyphShapingProperties.cs
- StructuredTypeInfo.cs
- Light.cs
- ContractNamespaceAttribute.cs
- DataGridColumn.cs
- PrePrepareMethodAttribute.cs
- InternalsVisibleToAttribute.cs
- PropertyFilterAttribute.cs
- IgnoreFileBuildProvider.cs
- SqlLiftIndependentRowExpressions.cs
- Guid.cs
- Int32CAMarshaler.cs
- CollectionViewSource.cs
- SemanticResultKey.cs
- DrawingGroupDrawingContext.cs
- Splitter.cs
- AssociationSet.cs
- Function.cs
- ControlHelper.cs
- DoubleLink.cs
- TrackPoint.cs
- XXXInfos.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- PrintDialog.cs
- XmlUtf8RawTextWriter.cs
- Scripts.cs
- HierarchicalDataSourceControl.cs
- PrivilegeNotHeldException.cs
- WebPartZoneBase.cs
- ToolStripDropDownMenu.cs
- WebServiceAttribute.cs
- CompiledScopeCriteria.cs
- StylusPointDescription.cs
- TextEncodedRawTextWriter.cs
- ApplicationBuildProvider.cs
- FontDialog.cs
- TextParagraphCache.cs
- PerspectiveCamera.cs
- ToolConsole.cs
- DataPagerCommandEventArgs.cs
- SynchronizedPool.cs
- AuthenticationModulesSection.cs
- FrameSecurityDescriptor.cs
- XmlMembersMapping.cs
- GridSplitterAutomationPeer.cs
- DefaultPrintController.cs
- XmlSignificantWhitespace.cs
- LogStore.cs
- SqlBuffer.cs
- DaylightTime.cs
- PolicyException.cs
- Converter.cs
- Process.cs
- Selector.cs
- UndoEngine.cs
- DbConnectionClosed.cs
- PathParser.cs
- MimeMapping.cs
- ColorMatrix.cs
- Context.cs
- TextServicesDisplayAttribute.cs
- MarginCollapsingState.cs
- Win32SafeHandles.cs
- DataRowExtensions.cs
- TrustManagerPromptUI.cs
- LocatorPart.cs
- HtmlInputSubmit.cs
- PointF.cs
- DiscardableAttribute.cs
- XmlQualifiedName.cs
- ResourcesGenerator.cs
- ConvertEvent.cs