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
- ManipulationStartedEventArgs.cs
- DrawingGroupDrawingContext.cs
- OpenTypeLayout.cs
- LabelInfo.cs
- BufferManager.cs
- Timeline.cs
- RSAOAEPKeyExchangeFormatter.cs
- Win32SafeHandles.cs
- BindingList.cs
- XmlSchemaParticle.cs
- ChooseAction.cs
- AsymmetricSignatureFormatter.cs
- RuntimeConfigurationRecord.cs
- ImageAnimator.cs
- PropertyGeneratedEventArgs.cs
- DirectoryNotFoundException.cs
- StringComparer.cs
- HttpResponse.cs
- DelegatedStream.cs
- ChangeConflicts.cs
- VectorAnimationBase.cs
- Wizard.cs
- SafeReversePInvokeHandle.cs
- MaterialGroup.cs
- AlgoModule.cs
- AuthorizationRuleCollection.cs
- FileUtil.cs
- RelatedImageListAttribute.cs
- DesignerFrame.cs
- StrokeCollectionConverter.cs
- FactoryGenerator.cs
- WebReference.cs
- NullReferenceException.cs
- DataGridColumnHeadersPresenter.cs
- WebPartDisplayModeCancelEventArgs.cs
- ContractListAdapter.cs
- WebSysDisplayNameAttribute.cs
- BinaryObjectReader.cs
- VisualStyleRenderer.cs
- ValidationPropertyAttribute.cs
- AttachedPropertyBrowsableAttribute.cs
- WSFederationHttpBindingCollectionElement.cs
- ExpressionsCollectionConverter.cs
- SessionEndingCancelEventArgs.cs
- CodeEntryPointMethod.cs
- CommandBinding.cs
- Configuration.cs
- SecurityTokenInclusionMode.cs
- AdornerLayer.cs
- AsyncInvokeContext.cs
- ExpressionPrefixAttribute.cs
- MemoryMappedFile.cs
- OutOfMemoryException.cs
- ActiveDesignSurfaceEvent.cs
- ViewPort3D.cs
- SplayTreeNode.cs
- SqlRecordBuffer.cs
- DurationConverter.cs
- SoapSchemaImporter.cs
- RsaEndpointIdentity.cs
- Crc32Helper.cs
- SrgsNameValueTag.cs
- NumericUpDown.cs
- documentsequencetextpointer.cs
- GridEntryCollection.cs
- PropertyConverter.cs
- BamlStream.cs
- GACMembershipCondition.cs
- CodeAssignStatement.cs
- DiscoveryClientElement.cs
- ValueTypeFixupInfo.cs
- DecimalConstantAttribute.cs
- PeerObject.cs
- DbDeleteCommandTree.cs
- ILGenerator.cs
- PartialCachingAttribute.cs
- TextEditorMouse.cs
- DrawingGroupDrawingContext.cs
- XmlQualifiedName.cs
- Simplifier.cs
- ConfigurationLocationCollection.cs
- MissingMemberException.cs
- Crypto.cs
- SQLDateTimeStorage.cs
- KnownBoxes.cs
- CounterSetInstanceCounterDataSet.cs
- Renderer.cs
- XmlSchemaAny.cs
- SqlBinder.cs
- MultiDataTrigger.cs
- ToolBar.cs
- ValidatorUtils.cs
- HttpPostProtocolImporter.cs
- SQLBytes.cs
- RtfFormatStack.cs
- OdbcDataReader.cs
- UserControlDocumentDesigner.cs
- FormsAuthenticationUser.cs
- DataAdapter.cs
- DataSysAttribute.cs