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
- LeftCellWrapper.cs
- ToolStripArrowRenderEventArgs.cs
- MethodCallConverter.cs
- AdRotator.cs
- SqlSupersetValidator.cs
- ExtentCqlBlock.cs
- PageParser.cs
- xmlfixedPageInfo.cs
- DriveInfo.cs
- RtType.cs
- DataServiceResponse.cs
- XPathBinder.cs
- SemanticResultValue.cs
- GridViewEditEventArgs.cs
- ProtocolProfile.cs
- ListViewInsertionMark.cs
- DateTimeUtil.cs
- ProxyFragment.cs
- columnmapkeybuilder.cs
- TypePresenter.xaml.cs
- SharedRuntimeState.cs
- ContactManager.cs
- Trace.cs
- ConnectionStringSettings.cs
- InvokePattern.cs
- DragDrop.cs
- DataSourceXmlSubItemAttribute.cs
- RequiredFieldValidator.cs
- Point4D.cs
- WebBrowsableAttribute.cs
- Operand.cs
- URIFormatException.cs
- DocumentPageViewAutomationPeer.cs
- CheckBox.cs
- Compress.cs
- RightNameExpirationInfoPair.cs
- ArgIterator.cs
- AudioSignalProblemOccurredEventArgs.cs
- HtmlInputText.cs
- BindingContext.cs
- PopupEventArgs.cs
- SoapCodeExporter.cs
- DBCommandBuilder.cs
- ToolStripDropDownDesigner.cs
- TabItemAutomationPeer.cs
- XamlToRtfParser.cs
- ObjectStateFormatter.cs
- OleDbPermission.cs
- WebServiceReceive.cs
- GenerateScriptTypeAttribute.cs
- AssociatedControlConverter.cs
- SelectorAutomationPeer.cs
- WebPartMinimizeVerb.cs
- XmlWriter.cs
- CombinedGeometry.cs
- MimeBasePart.cs
- UserInitiatedNavigationPermission.cs
- PropertyStore.cs
- DataGridColumn.cs
- DataGridItemCollection.cs
- ScalarRestriction.cs
- ParameterCollection.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- CommandSet.cs
- FlowPosition.cs
- StateDesigner.LayoutSelectionGlyph.cs
- Oid.cs
- ContentValidator.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- InvalidProgramException.cs
- HwndHost.cs
- InternalResources.cs
- Thread.cs
- FontUnitConverter.cs
- IntegerFacetDescriptionElement.cs
- ControlCodeDomSerializer.cs
- SerialPort.cs
- PlatformCulture.cs
- XmlStrings.cs
- Serializer.cs
- BitmapDownload.cs
- AuthorizationSection.cs
- CodeDOMProvider.cs
- MatrixTransform.cs
- FontFaceLayoutInfo.cs
- VScrollBar.cs
- PerformanceCounterLib.cs
- SecurityRuntime.cs
- OdbcInfoMessageEvent.cs
- XPathParser.cs
- BamlRecordHelper.cs
- HttpContext.cs
- Lease.cs
- DesignerRegionCollection.cs
- TextFragmentEngine.cs
- ToolStripContainerActionList.cs
- DeflateStreamAsyncResult.cs
- IndependentAnimationStorage.cs
- DataControlFieldTypeEditor.cs
- XmlHelper.cs