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
- PointF.cs
- MediaPlayer.cs
- Misc.cs
- RenderDataDrawingContext.cs
- AdRotator.cs
- SecurityDescriptor.cs
- CapacityStreamGeometryContext.cs
- CommentEmitter.cs
- MILUtilities.cs
- IInstanceTable.cs
- XmlDataSourceNodeDescriptor.cs
- MenuItemCollectionEditor.cs
- LinqDataSourceDisposeEventArgs.cs
- HttpHeaderCollection.cs
- PartitionedStream.cs
- SoapSchemaImporter.cs
- HierarchicalDataSourceControl.cs
- IsolatedStorageFileStream.cs
- VirtualPathUtility.cs
- ToolStripContainer.cs
- ContractMethodInfo.cs
- SoundPlayerAction.cs
- ApplicationActivator.cs
- RsaSecurityKey.cs
- Brush.cs
- Configuration.cs
- TripleDES.cs
- QueryCursorEventArgs.cs
- DefaultProfileManager.cs
- Int64.cs
- ProxyWebPartManagerDesigner.cs
- MultiDataTrigger.cs
- Assert.cs
- PointF.cs
- DefaultExpression.cs
- EntityDataSourceUtil.cs
- TypeDescriptionProviderAttribute.cs
- UIInitializationException.cs
- SeekStoryboard.cs
- DataColumnMapping.cs
- AtomMaterializer.cs
- MachineKeyConverter.cs
- mil_sdk_version.cs
- CompoundFileStreamReference.cs
- Missing.cs
- UserControlBuildProvider.cs
- __Error.cs
- EditorPartCollection.cs
- ClosableStream.cs
- Rule.cs
- DataControlFieldsEditor.cs
- OleDbConnection.cs
- WebPartChrome.cs
- Tile.cs
- XmlNamespaceManager.cs
- CharacterShapingProperties.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ScriptReferenceEventArgs.cs
- ControlParser.cs
- DataStreams.cs
- WebPartVerbsEventArgs.cs
- Section.cs
- SerialErrors.cs
- _BaseOverlappedAsyncResult.cs
- ReferentialConstraint.cs
- ThreadStateException.cs
- DeclaredTypeValidatorAttribute.cs
- GrammarBuilderBase.cs
- SoapObjectWriter.cs
- XmlEnumAttribute.cs
- SqlExpander.cs
- CodeBinaryOperatorExpression.cs
- TextContainerChangeEventArgs.cs
- InteropTrackingRecord.cs
- SizeValueSerializer.cs
- TypeResolvingOptionsAttribute.cs
- WindowsListViewItemCheckBox.cs
- SmtpSection.cs
- EntityDataSourceViewSchema.cs
- GridItem.cs
- codemethodreferenceexpression.cs
- DataControlHelper.cs
- SchemaManager.cs
- MultipleViewPattern.cs
- MenuItemStyle.cs
- SqlMultiplexer.cs
- SequenceNumber.cs
- input.cs
- DbConnectionFactory.cs
- QilBinary.cs
- ObjectReaderCompiler.cs
- HttpCapabilitiesEvaluator.cs
- _Events.cs
- EntityContainerEmitter.cs
- SQLStringStorage.cs
- RelationshipFixer.cs
- activationcontext.cs
- ModelUtilities.cs
- PlainXmlSerializer.cs
- CompositeDataBoundControl.cs