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
- ServerIdentity.cs
- LogFlushAsyncResult.cs
- StyleHelper.cs
- QueryableDataSourceView.cs
- Line.cs
- DefaultSection.cs
- LogManagementAsyncResult.cs
- RowBinding.cs
- TableHeaderCell.cs
- DiagnosticTrace.cs
- configsystem.cs
- NodeFunctions.cs
- TraceFilter.cs
- Transactions.cs
- UrlMappingCollection.cs
- RegexInterpreter.cs
- DiagnosticsConfigurationHandler.cs
- SafeNativeMethods.cs
- DataGridTableCollection.cs
- WebPartHeaderCloseVerb.cs
- DefaultTextStore.cs
- _BufferOffsetSize.cs
- PropertyInformationCollection.cs
- TextBox.cs
- BitmapCodecInfoInternal.cs
- PanelDesigner.cs
- IntPtr.cs
- OracleFactory.cs
- PropertyValueUIItem.cs
- ClusterRegistryConfigurationProvider.cs
- JsonReaderDelegator.cs
- Privilege.cs
- InvalidPrinterException.cs
- EntityProviderFactory.cs
- BooleanStorage.cs
- BufferAllocator.cs
- ProfileService.cs
- MetadataSection.cs
- WebDescriptionAttribute.cs
- User.cs
- ObjectAnimationUsingKeyFrames.cs
- WindowsButton.cs
- Int32KeyFrameCollection.cs
- Ticks.cs
- ZipIOModeEnforcingStream.cs
- SystemIPGlobalStatistics.cs
- BitmapPalette.cs
- SourceFileInfo.cs
- ClickablePoint.cs
- RegexFCD.cs
- ObjectNotFoundException.cs
- Win32SafeHandles.cs
- Tokenizer.cs
- WinEventWrap.cs
- WebHostUnsafeNativeMethods.cs
- SecurityKeyUsage.cs
- ReferencedCollectionType.cs
- XmlNullResolver.cs
- NameValueSectionHandler.cs
- ConstructorBuilder.cs
- SecondaryViewProvider.cs
- SpoolingTask.cs
- TypefaceMap.cs
- ParseHttpDate.cs
- GridView.cs
- LocatorGroup.cs
- CatalogZoneBase.cs
- ObjectStorage.cs
- Utils.cs
- BinaryNode.cs
- QuaternionIndependentAnimationStorage.cs
- DbConnectionStringBuilder.cs
- SystemTcpConnection.cs
- OciLobLocator.cs
- XsdValidatingReader.cs
- DataGridViewCellEventArgs.cs
- DisplayMemberTemplateSelector.cs
- CollectionViewGroupInternal.cs
- InputLanguageEventArgs.cs
- Translator.cs
- TreeIterators.cs
- Executor.cs
- ELinqQueryState.cs
- WizardPanelChangingEventArgs.cs
- UnsafeNativeMethods.cs
- Model3DGroup.cs
- HttpBufferlessInputStream.cs
- AsymmetricKeyExchangeDeformatter.cs
- NumericUpDownAccelerationCollection.cs
- XamlRtfConverter.cs
- InstanceCollisionException.cs
- HtmlInputButton.cs
- CurrentTimeZone.cs
- _SafeNetHandles.cs
- WindowsFormsLinkLabel.cs
- shaperfactory.cs
- SmiEventSink.cs
- PaginationProgressEventArgs.cs
- XmlBufferReader.cs
- CompositeDataBoundControl.cs