Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Thickness.cs
- GenericEnumConverter.cs
- Queue.cs
- TreeSet.cs
- EventDescriptor.cs
- InvalidProgramException.cs
- TextClipboardData.cs
- ApplicationFileParser.cs
- VariantWrapper.cs
- BStrWrapper.cs
- Avt.cs
- XmlHierarchicalDataSourceView.cs
- Funcletizer.cs
- SoapIncludeAttribute.cs
- SerialPinChanges.cs
- WebServiceMethodData.cs
- wgx_sdk_version.cs
- TextBox.cs
- HierarchicalDataBoundControlAdapter.cs
- InputMethod.cs
- LineServicesRun.cs
- MessageBox.cs
- HttpCacheVary.cs
- DataRowChangeEvent.cs
- FrameworkContextData.cs
- PerformanceCounter.cs
- StdValidatorsAndConverters.cs
- VectorAnimationUsingKeyFrames.cs
- QilInvokeLateBound.cs
- UriSection.cs
- LayoutSettings.cs
- PrinterUnitConvert.cs
- RadioButtonStandardAdapter.cs
- SoapConverter.cs
- BStrWrapper.cs
- HandleCollector.cs
- LogLogRecordHeader.cs
- RecordBuilder.cs
- OrderedDictionaryStateHelper.cs
- GlyphRunDrawing.cs
- ExpressionSelection.cs
- RightsManagementEncryptionTransform.cs
- MulticastOption.cs
- InstanceDescriptor.cs
- PageAdapter.cs
- WorkerRequest.cs
- CharEntityEncoderFallback.cs
- NavigatorInput.cs
- FactoryMaker.cs
- CoreSwitches.cs
- TextRangeAdaptor.cs
- BitmapEffectInput.cs
- TableDetailsCollection.cs
- MessageEventSubscriptionService.cs
- TTSEngineProxy.cs
- CryptographicAttribute.cs
- PageRequestManager.cs
- StateBag.cs
- CachedCompositeFamily.cs
- ProfileModule.cs
- DispatcherExceptionFilterEventArgs.cs
- WebPartsPersonalization.cs
- SystemColors.cs
- LinqDataSourceInsertEventArgs.cs
- UnauthorizedWebPart.cs
- TextSpan.cs
- SecurityTokenParameters.cs
- StringValidator.cs
- ChangesetResponse.cs
- ListViewGroupConverter.cs
- BitmapCodecInfoInternal.cs
- MemberPath.cs
- BindingExpression.cs
- AnchoredBlock.cs
- PropertyDescriptorGridEntry.cs
- GridItemCollection.cs
- PatternMatchRules.cs
- EqualityComparer.cs
- DbUpdateCommandTree.cs
- FrameworkContentElement.cs
- WebPartUserCapability.cs
- PanelDesigner.cs
- EditCommandColumn.cs
- PolyLineSegmentFigureLogic.cs
- ActivitySurrogate.cs
- CommonObjectSecurity.cs
- SelectionRange.cs
- WpfPayload.cs
- UnauthorizedAccessException.cs
- CategoryGridEntry.cs
- ReadOnlyAttribute.cs
- ActivityDesigner.cs
- FloaterBaseParaClient.cs
- ManagedFilter.cs
- HttpHandler.cs
- ActivityFunc.cs
- RouteItem.cs
- GenericAuthenticationEventArgs.cs
- IFlowDocumentViewer.cs
- HwndSource.cs