Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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() { } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BuildProvider.cs
- WriterOutput.cs
- Validator.cs
- SqlUDTStorage.cs
- MouseGestureValueSerializer.cs
- XmlLangPropertyAttribute.cs
- PageAdapter.cs
- DataTablePropertyDescriptor.cs
- Page.cs
- SafeMemoryMappedFileHandle.cs
- SingleStorage.cs
- StronglyTypedResourceBuilder.cs
- EncodingDataItem.cs
- FileDialog.cs
- SortDescription.cs
- PlainXmlWriter.cs
- ScrollEvent.cs
- HttpValueCollection.cs
- RotateTransform3D.cs
- ThrowHelper.cs
- RequestChannelBinder.cs
- SetterBase.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ValueOfAction.cs
- ConnectionManagementSection.cs
- AttributeEmitter.cs
- NavigationFailedEventArgs.cs
- BeginSelectCardRequest.cs
- DrawingAttributesDefaultValueFactory.cs
- CollectionsUtil.cs
- ToolStripTextBox.cs
- SafePEFileHandle.cs
- ValueTypeFixupInfo.cs
- ContentPlaceHolder.cs
- ControlValuePropertyAttribute.cs
- SecurityTokenValidationException.cs
- WebReferenceCollection.cs
- ItemCollection.cs
- TreeNodeStyle.cs
- TransformerTypeCollection.cs
- SiteMembershipCondition.cs
- SplashScreen.cs
- FileDialogCustomPlacesCollection.cs
- DesignerActionUIService.cs
- XPathSelfQuery.cs
- DataTableCollection.cs
- EncoderBestFitFallback.cs
- EraserBehavior.cs
- MetadataArtifactLoaderFile.cs
- WebServiceErrorEvent.cs
- LicenseContext.cs
- TreeView.cs
- RuleProcessor.cs
- ScrollableControlDesigner.cs
- LineVisual.cs
- FixedSOMPageConstructor.cs
- PageParserFilter.cs
- RelatedPropertyManager.cs
- Image.cs
- Style.cs
- DataGridTableCollection.cs
- RegexWorker.cs
- PenContexts.cs
- DockEditor.cs
- IdentityManager.cs
- SQLSingle.cs
- BitmapEffectCollection.cs
- RC2CryptoServiceProvider.cs
- ProcessHost.cs
- ScrollItemPattern.cs
- SamlAuthorityBinding.cs
- XmlCodeExporter.cs
- PageBreakRecord.cs
- Resources.Designer.cs
- XmlSyndicationContent.cs
- Subset.cs
- Label.cs
- DrawingAttributeSerializer.cs
- ObjectFullSpanRewriter.cs
- Roles.cs
- PolicyManager.cs
- SerializableAttribute.cs
- RenderOptions.cs
- ProcessModule.cs
- RtfControls.cs
- QilReference.cs
- ActivityDesigner.cs
- ApplicationFileParser.cs
- EntityCollection.cs
- SqlCachedBuffer.cs
- DynamicRendererThreadManager.cs
- Roles.cs
- SoapExtensionReflector.cs
- DataGridPagingPage.cs
- SiteMapNodeItem.cs
- ClientScriptManager.cs
- SingleAnimationBase.cs
- EntityDataSourceView.cs
- XamlPoint3DCollectionSerializer.cs
- BamlStream.cs