Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Management / IisTraceWebEventProvider.cs / 3 / 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
- Binding.cs
- LinkLabel.cs
- UserMapPath.cs
- OleDbStruct.cs
- WorkflowApplication.cs
- DispatchWrapper.cs
- CodeDefaultValueExpression.cs
- CodeDomSerializerException.cs
- HtmlElementEventArgs.cs
- SrgsDocument.cs
- TreeIterator.cs
- WebPartChrome.cs
- FontInfo.cs
- StreamInfo.cs
- CopyAttributesAction.cs
- UnsupportedPolicyOptionsException.cs
- MetafileHeader.cs
- LightweightCodeGenerator.cs
- XmlWhitespace.cs
- PerfCounterSection.cs
- XmlPreloadedResolver.cs
- AmbientProperties.cs
- AssociatedControlConverter.cs
- PasswordRecovery.cs
- TabControl.cs
- ConfigUtil.cs
- ExpressionPrinter.cs
- cryptoapiTransform.cs
- Color.cs
- Transform.cs
- BulletedListEventArgs.cs
- MasterPageParser.cs
- SuppressMergeCheckAttribute.cs
- GridViewDesigner.cs
- StateBag.cs
- TextPointerBase.cs
- MenuCommands.cs
- CollectionChangedEventManager.cs
- _BasicClient.cs
- HelpExampleGenerator.cs
- PtsHelper.cs
- ToolStripDropDownClosingEventArgs.cs
- SqlGenericUtil.cs
- MaterializeFromAtom.cs
- DbConnectionHelper.cs
- AlternateView.cs
- DoubleAnimationUsingPath.cs
- ToolboxComponentsCreatedEventArgs.cs
- SettingsPropertyValueCollection.cs
- XPathDocumentBuilder.cs
- PropertyKey.cs
- IOThreadTimer.cs
- ActivitySurrogateSelector.cs
- XamlDesignerSerializationManager.cs
- PseudoWebRequest.cs
- DataRelation.cs
- ItemDragEvent.cs
- LOSFormatter.cs
- InputScope.cs
- UIElement3D.cs
- PnrpPermission.cs
- WinFormsSpinner.cs
- XmlDataSourceView.cs
- FuncTypeConverter.cs
- SubtreeProcessor.cs
- propertyentry.cs
- SafeArrayTypeMismatchException.cs
- SaveFileDialogDesigner.cs
- MultipleViewPattern.cs
- SpecialNameAttribute.cs
- HtmlInputReset.cs
- WebPartConnectionsCancelEventArgs.cs
- EditorZoneBase.cs
- SchemaTableOptionalColumn.cs
- SchemaImporterExtensionElementCollection.cs
- SamlAttribute.cs
- ITreeGenerator.cs
- TreeBuilderXamlTranslator.cs
- InstanceOwner.cs
- SafeSecurityHelper.cs
- CustomAttributeBuilder.cs
- PropertiesTab.cs
- EnumerableRowCollectionExtensions.cs
- HashSetEqualityComparer.cs
- BinaryFormatter.cs
- HuffmanTree.cs
- RSAPKCS1KeyExchangeFormatter.cs
- CodeIndexerExpression.cs
- ScriptServiceAttribute.cs
- TextFormatterContext.cs
- ReadOnlyCollectionBuilder.cs
- ClipboardData.cs
- ConnectionsZone.cs
- TextureBrush.cs
- XmlSchemaException.cs
- WebPartAddingEventArgs.cs
- ObjectListCommandsPage.cs
- MenuItem.cs
- PassportAuthenticationModule.cs
- NaturalLanguageHyphenator.cs