Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Management / IisTraceWebEventProvider.cs / 1305376 / 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 //////////// 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 //////////// 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
- SocketStream.cs
- CryptoConfig.cs
- DbSource.cs
- sitestring.cs
- COM2AboutBoxPropertyDescriptor.cs
- XmlSchemaType.cs
- X509Certificate2Collection.cs
- FieldNameLookup.cs
- DataGridState.cs
- WpfSharedBamlSchemaContext.cs
- ObjectTokenCategory.cs
- CustomDictionarySources.cs
- Rules.cs
- IndexedString.cs
- OutputCacheSettingsSection.cs
- shaperfactoryquerycacheentry.cs
- FormsAuthenticationEventArgs.cs
- CompilationRelaxations.cs
- ProfileParameter.cs
- cookiecontainer.cs
- InstanceContextMode.cs
- Activator.cs
- Rotation3DKeyFrameCollection.cs
- ToolStripPanelRow.cs
- NextPreviousPagerField.cs
- CompilerGeneratedAttribute.cs
- DataSourceSelectArguments.cs
- GroupBox.cs
- ItemChangedEventArgs.cs
- WebPartMenu.cs
- Button.cs
- MaterialCollection.cs
- EnumConverter.cs
- DocumentSequenceHighlightLayer.cs
- DocumentOrderQuery.cs
- CodeNamespaceImport.cs
- DbConnectionPoolGroupProviderInfo.cs
- DataKeyArray.cs
- RuntimeConfigLKG.cs
- DbParameterCollectionHelper.cs
- _ListenerResponseStream.cs
- WebPartTransformerAttribute.cs
- DateBoldEvent.cs
- SqlCacheDependencyDatabase.cs
- StringWriter.cs
- RegexBoyerMoore.cs
- Trace.cs
- PageThemeCodeDomTreeGenerator.cs
- CheckPair.cs
- SQLUtility.cs
- LightweightEntityWrapper.cs
- TypeToArgumentTypeConverter.cs
- Int32KeyFrameCollection.cs
- DataContractSerializerServiceBehavior.cs
- ServiceEndpoint.cs
- SequentialUshortCollection.cs
- Bold.cs
- Matrix.cs
- TextSearch.cs
- MinMaxParagraphWidth.cs
- AttributeCollection.cs
- CustomMenuItemCollection.cs
- PropertyValueChangedEvent.cs
- HandleExceptionArgs.cs
- DelayDesigner.cs
- DynamicFilterExpression.cs
- EventLogTraceListener.cs
- BitmapCodecInfo.cs
- DocumentApplicationJournalEntryEventArgs.cs
- SecureEnvironment.cs
- EnglishPluralizationService.cs
- HttpCacheVary.cs
- StyleTypedPropertyAttribute.cs
- SerializationException.cs
- TextTreeRootTextBlock.cs
- Propagator.ExtentPlaceholderCreator.cs
- DesignerVerbCollection.cs
- MessageProtectionOrder.cs
- InheritablePropertyChangeInfo.cs
- _ContextAwareResult.cs
- StringUtil.cs
- CategoryAttribute.cs
- DocumentOrderComparer.cs
- CustomBinding.cs
- EntityCollection.cs
- TextPatternIdentifiers.cs
- KnownTypesProvider.cs
- SecurityCriticalDataForSet.cs
- StylusPointProperties.cs
- Math.cs
- TemplatedMailWebEventProvider.cs
- DrawToolTipEventArgs.cs
- ContentElement.cs
- ErrorFormatter.cs
- IsolatedStoragePermission.cs
- UnionCodeGroup.cs
- XPathNavigatorKeyComparer.cs
- NetworkInterface.cs
- AssemblyContextControlItem.cs
- ValidationPropertyAttribute.cs