Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Management / IisTraceWebEventProvider.cs / 2 / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HiddenFieldPageStatePersister.cs
- DeadCharTextComposition.cs
- RegistryKey.cs
- SqlClientPermission.cs
- FontUnitConverter.cs
- columnmapfactory.cs
- ConfigXmlWhitespace.cs
- FederatedMessageSecurityOverHttp.cs
- TextSchema.cs
- ProtocolElement.cs
- ConsoleEntryPoint.cs
- WebDisplayNameAttribute.cs
- EditorResources.cs
- EdmProperty.cs
- RedirectionProxy.cs
- ChildTable.cs
- CodeDOMUtility.cs
- sortedlist.cs
- UnsafeNativeMethods.cs
- ReaderOutput.cs
- FontCacheLogic.cs
- WorkflowApplicationUnloadedException.cs
- uribuilder.cs
- GeometryConverter.cs
- UrlAuthorizationModule.cs
- Command.cs
- MsmqTransportSecurity.cs
- DataGrid.cs
- XhtmlBasicTextBoxAdapter.cs
- IntersectQueryOperator.cs
- ExtendLockCommand.cs
- TableLayoutPanelResizeGlyph.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- COM2Enum.cs
- ProviderSettings.cs
- PersistenceTypeAttribute.cs
- OutputCacheSettingsSection.cs
- TransactionTable.cs
- ChannelServices.cs
- JsonEncodingStreamWrapper.cs
- figurelengthconverter.cs
- ScriptReference.cs
- PointLightBase.cs
- Geometry3D.cs
- MultiView.cs
- SoapAttributeOverrides.cs
- CodeSnippetCompileUnit.cs
- ObjectQuery.cs
- HttpFileCollection.cs
- RepeatInfo.cs
- DbProviderFactoriesConfigurationHandler.cs
- altserialization.cs
- DataGridViewCellEventArgs.cs
- PolyBezierSegment.cs
- ObjRef.cs
- BlobPersonalizationState.cs
- QilXmlWriter.cs
- WebServiceErrorEvent.cs
- Nodes.cs
- ErrorHandler.cs
- TextFormatterHost.cs
- PointCollectionConverter.cs
- TextOnlyOutput.cs
- Win32KeyboardDevice.cs
- BezierSegment.cs
- SchemaImporter.cs
- SqlInternalConnectionTds.cs
- IteratorFilter.cs
- GB18030Encoding.cs
- Encoder.cs
- GZipUtils.cs
- FactoryRecord.cs
- DeferredReference.cs
- WizardSideBarListControlItemEventArgs.cs
- ToolStripCustomTypeDescriptor.cs
- CodeGenerator.cs
- RemotingSurrogateSelector.cs
- NativeMethods.cs
- DataGridViewElement.cs
- Socket.cs
- securitycriticaldataformultiplegetandset.cs
- HttpSessionStateWrapper.cs
- OperandQuery.cs
- PageParserFilter.cs
- HelpEvent.cs
- DurableInstanceManager.cs
- CompressedStack.cs
- AutomationProperty.cs
- CodeSubDirectory.cs
- DBPropSet.cs
- ipaddressinformationcollection.cs
- BinaryConverter.cs
- IgnoreFileBuildProvider.cs
- SiteMapDataSource.cs
- EmptyElement.cs
- PlaceHolder.cs
- ImageDrawing.cs
- ScriptReferenceBase.cs
- SiteMapNodeItemEventArgs.cs
- DataGridViewBindingCompleteEventArgs.cs