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
- XmlWrappingWriter.cs
- HitTestWithPointDrawingContextWalker.cs
- NativeMethods.cs
- MenuItemBindingCollection.cs
- OdbcException.cs
- HttpHandlerAction.cs
- DashStyle.cs
- FaultDesigner.cs
- CodeIndexerExpression.cs
- MruCache.cs
- SyncMethodInvoker.cs
- NotConverter.cs
- QilCloneVisitor.cs
- TdsParserSessionPool.cs
- DataGridComponentEditor.cs
- SqlDataReader.cs
- ClientFormsIdentity.cs
- LinqDataSourceSelectEventArgs.cs
- KeyManager.cs
- HostProtectionException.cs
- ISCIIEncoding.cs
- VirtualPathUtility.cs
- XmlSchemaCompilationSettings.cs
- Decoder.cs
- URI.cs
- NodeFunctions.cs
- NetCodeGroup.cs
- CheckBoxBaseAdapter.cs
- QueryCreatedEventArgs.cs
- XmlObjectSerializerReadContextComplexJson.cs
- DetailsViewRow.cs
- IriParsingElement.cs
- PeerNearMe.cs
- PropertyReferenceExtension.cs
- GeometryConverter.cs
- FileLogRecordHeader.cs
- XamlHostingSection.cs
- GenericFlowSwitchHelper.cs
- BindingsCollection.cs
- XmlILAnnotation.cs
- sqlnorm.cs
- Hashtable.cs
- ImageBrush.cs
- CaseInsensitiveComparer.cs
- MetadataImporterQuotas.cs
- ConnectionConsumerAttribute.cs
- ClientBuildManagerCallback.cs
- IChannel.cs
- FlowDocumentView.cs
- DragEvent.cs
- XhtmlConformanceSection.cs
- GlobalizationSection.cs
- FontStretchConverter.cs
- DataReaderContainer.cs
- CapabilitiesAssignment.cs
- JsonQNameDataContract.cs
- mda.cs
- ErrorHandler.cs
- FileLogRecord.cs
- ProfileGroupSettings.cs
- DataGridHeaderBorder.cs
- DiscreteKeyFrames.cs
- RelatedCurrencyManager.cs
- CodeAttributeArgumentCollection.cs
- filewebrequest.cs
- WorkflowTransactionService.cs
- PrintPreviewGraphics.cs
- TypeContext.cs
- ConstructorExpr.cs
- Assert.cs
- WebPartConnectionCollection.cs
- PerformanceCounterLib.cs
- TextTreeObjectNode.cs
- Comparer.cs
- TreeViewEvent.cs
- SqlRewriteScalarSubqueries.cs
- Propagator.ExtentPlaceholderCreator.cs
- RubberbandSelector.cs
- HttpModuleCollection.cs
- EventWaitHandleSecurity.cs
- XsltInput.cs
- TemplateBamlTreeBuilder.cs
- ValueTypeFieldReference.cs
- DataGridHeaderBorder.cs
- ScrollViewerAutomationPeer.cs
- DesignBinding.cs
- XPathConvert.cs
- LabelDesigner.cs
- Interlocked.cs
- UnsafeNativeMethodsCLR.cs
- ByteRangeDownloader.cs
- WebReferenceOptions.cs
- CombinedGeometry.cs
- FormViewPageEventArgs.cs
- ServiceDescriptionSerializer.cs
- initElementDictionary.cs
- ProfileSettings.cs
- LinqDataSourceView.cs
- SerializationObjectManager.cs
- DesignerUtils.cs