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
- WCFServiceClientProxyGenerator.cs
- RelationalExpressions.cs
- ServiceDesigner.cs
- ListMarkerSourceInfo.cs
- SqlTransaction.cs
- BamlResourceSerializer.cs
- Pool.cs
- LiteralControl.cs
- TabOrder.cs
- DiagnosticTrace.cs
- DataBoundControlActionList.cs
- DataGrid.cs
- DocumentViewerHelper.cs
- WindowHideOrCloseTracker.cs
- StaticFileHandler.cs
- DockingAttribute.cs
- WindowsStreamSecurityBindingElement.cs
- SchemaEntity.cs
- XPathSelfQuery.cs
- PersonalizationStateQuery.cs
- ByteAnimation.cs
- ButtonFlatAdapter.cs
- DiagnosticStrings.cs
- DrawingBrush.cs
- IApplicationTrustManager.cs
- Literal.cs
- EntityDataSourceState.cs
- AutoResetEvent.cs
- LoginNameDesigner.cs
- SqlMethods.cs
- TreeViewHitTestInfo.cs
- CssClassPropertyAttribute.cs
- SimpleWebHandlerParser.cs
- WebUtil.cs
- DoubleLinkListEnumerator.cs
- XmlSignificantWhitespace.cs
- ArrangedElement.cs
- BaseValidator.cs
- HtmlFormWrapper.cs
- Stopwatch.cs
- HelpKeywordAttribute.cs
- GraphicsContainer.cs
- WindowsStatic.cs
- DataSourceNameHandler.cs
- TrustLevelCollection.cs
- SafeSecurityHandles.cs
- ValidationErrorEventArgs.cs
- ListViewEditEventArgs.cs
- LogLogRecordEnumerator.cs
- PenLineCapValidation.cs
- SchemaHelper.cs
- DataBinding.cs
- RegexNode.cs
- ArrayItemValue.cs
- ComponentDispatcherThread.cs
- HandlerElement.cs
- PropertyMetadata.cs
- WebServiceClientProxyGenerator.cs
- ButtonBase.cs
- ImageInfo.cs
- JournalEntryStack.cs
- TypeLibConverter.cs
- SupportingTokenDuplexChannel.cs
- ValidateNames.cs
- TableRowGroup.cs
- ClientSettingsSection.cs
- _CookieModule.cs
- BoundConstants.cs
- Soap12FormatExtensions.cs
- Command.cs
- ThreadAttributes.cs
- HttpCachePolicy.cs
- CollectionBuilder.cs
- FilterFactory.cs
- ListItemCollection.cs
- Script.cs
- HtmlTableCellCollection.cs
- OutputCacheSettingsSection.cs
- DocumentViewerBaseAutomationPeer.cs
- RichTextBoxAutomationPeer.cs
- ToggleProviderWrapper.cs
- Wizard.cs
- SettingsPropertyIsReadOnlyException.cs
- SqlReorderer.cs
- ReferentialConstraint.cs
- CrossSiteScriptingValidation.cs
- XmlAnyElementAttributes.cs
- ActiveDesignSurfaceEvent.cs
- Module.cs
- ImageFormat.cs
- AxisAngleRotation3D.cs
- HtmlMobileTextWriter.cs
- SpecialNameAttribute.cs
- IdentityNotMappedException.cs
- ActivityExecutionFilter.cs
- ScriptingWebServicesSectionGroup.cs
- RotateTransform3D.cs
- ContextMenu.cs
- MobileTemplatedControlDesigner.cs
- DataContractSerializerOperationGenerator.cs