Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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() { } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EmptyEnumerable.cs
- TableLayoutColumnStyleCollection.cs
- TempEnvironment.cs
- RbTree.cs
- TargetConverter.cs
- CodeMemberMethod.cs
- ScriptResourceInfo.cs
- DataGridViewHitTestInfo.cs
- DescendantBaseQuery.cs
- Evaluator.cs
- SearchForVirtualItemEventArgs.cs
- JournalEntry.cs
- WebPartDisplayMode.cs
- HttpResponseInternalWrapper.cs
- FormatterConverter.cs
- SignedXmlDebugLog.cs
- MutableAssemblyCacheEntry.cs
- FormatterServices.cs
- AmbientValueAttribute.cs
- Polyline.cs
- InputLanguageManager.cs
- SchemaExporter.cs
- NetCodeGroup.cs
- RadioButtonRenderer.cs
- NetDataContractSerializer.cs
- SynchronizedInputAdaptor.cs
- FontCollection.cs
- ImageList.cs
- JpegBitmapDecoder.cs
- RSAProtectedConfigurationProvider.cs
- TreeViewHitTestInfo.cs
- RuntimeHelpers.cs
- ContextStaticAttribute.cs
- CompositeControl.cs
- WizardStepBase.cs
- PackageDigitalSignature.cs
- EpmContentSerializer.cs
- Int32.cs
- ToolStripGrip.cs
- HostProtectionException.cs
- ActiveXHost.cs
- Vector3D.cs
- SubclassTypeValidatorAttribute.cs
- ListViewSortEventArgs.cs
- NullReferenceException.cs
- FileEnumerator.cs
- PrivacyNoticeBindingElementImporter.cs
- PinnedBufferMemoryStream.cs
- SyncMethodInvoker.cs
- CollectionChangeEventArgs.cs
- QueryRewriter.cs
- CqlParser.cs
- InvalidateEvent.cs
- SqlDuplicator.cs
- WebPartExportVerb.cs
- WithParamAction.cs
- RangeBaseAutomationPeer.cs
- SQLByte.cs
- PathParser.cs
- BuildManager.cs
- EntitySqlQueryCacheKey.cs
- Endpoint.cs
- CodeTryCatchFinallyStatement.cs
- DesignerActionPropertyItem.cs
- DataGridViewRowsAddedEventArgs.cs
- MenuCommands.cs
- HttpCookiesSection.cs
- FileInfo.cs
- OdbcEnvironmentHandle.cs
- Sequence.cs
- X509Certificate2.cs
- SqlExpressionNullability.cs
- NativeMethods.cs
- WindowsTreeView.cs
- TextBox.cs
- IisTraceListener.cs
- MailDefinition.cs
- FirstMatchCodeGroup.cs
- CodeAttributeDeclarationCollection.cs
- MouseWheelEventArgs.cs
- SessionIDManager.cs
- TraceSection.cs
- BatchServiceHost.cs
- OracleDataAdapter.cs
- CustomErrorsSection.cs
- Int32EqualityComparer.cs
- Schema.cs
- PenThreadWorker.cs
- GridViewRow.cs
- FloaterParaClient.cs
- LocatorPart.cs
- SqlExpressionNullability.cs
- DataGridColumn.cs
- XmlHelper.cs
- ReliabilityContractAttribute.cs
- WebPartConnectionsDisconnectVerb.cs
- SqlClientMetaDataCollectionNames.cs
- PropertyPathConverter.cs
- PermissionSetEnumerator.cs
- assemblycache.cs