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
- ComplexBindingPropertiesAttribute.cs
- BounceEase.cs
- XPathNavigator.cs
- FormViewPageEventArgs.cs
- IdentitySection.cs
- RemotingConfigParser.cs
- FacetEnabledSchemaElement.cs
- CustomWebEventKey.cs
- SamlAction.cs
- Roles.cs
- SchemaCollectionCompiler.cs
- UInt64.cs
- CodeValidator.cs
- UserUseLicenseDictionaryLoader.cs
- GlobalAllocSafeHandle.cs
- TypographyProperties.cs
- ControlCommandSet.cs
- DbBuffer.cs
- BaseTemplatedMobileComponentEditor.cs
- HitTestParameters.cs
- StringKeyFrameCollection.cs
- MaskedTextBox.cs
- GACMembershipCondition.cs
- DbExpressionVisitor.cs
- TableLayoutRowStyleCollection.cs
- Material.cs
- IgnoreSection.cs
- InteropBitmapSource.cs
- DropShadowBitmapEffect.cs
- TreeNode.cs
- AutomationProperties.cs
- Schema.cs
- TraceContext.cs
- ExecutedRoutedEventArgs.cs
- _AutoWebProxyScriptWrapper.cs
- EditorAttributeInfo.cs
- GeometryModel3D.cs
- CustomBindingElement.cs
- FontSource.cs
- CompilationUnit.cs
- LogicalExpressionTypeConverter.cs
- DataService.cs
- SerializationStore.cs
- XmlWellformedWriter.cs
- MultiView.cs
- PointAnimationUsingPath.cs
- UrlEncodedParameterWriter.cs
- TextRunTypographyProperties.cs
- SourceItem.cs
- StaticContext.cs
- ContainerVisual.cs
- DataServiceKeyAttribute.cs
- CodeDirectionExpression.cs
- SurrogateEncoder.cs
- BitmapInitialize.cs
- EntityDataSourceSelectingEventArgs.cs
- StateMachineWorkflowInstance.cs
- SettingsSection.cs
- HexParser.cs
- XmlILModule.cs
- RecordBuilder.cs
- CodeArgumentReferenceExpression.cs
- CommandBinding.cs
- PriorityQueue.cs
- ValueSerializerAttribute.cs
- DataSetUtil.cs
- CommonDialog.cs
- PrefixHandle.cs
- ToolboxItemWrapper.cs
- InfoCardRSACryptoProvider.cs
- BooleanProjectedSlot.cs
- CodeTypeOfExpression.cs
- EntityStoreSchemaGenerator.cs
- ProviderConnectionPoint.cs
- ToolStripItemCollection.cs
- WebPartHeaderCloseVerb.cs
- InkSerializer.cs
- XsltException.cs
- URI.cs
- StylusEventArgs.cs
- MaskedTextBoxTextEditorDropDown.cs
- InternalResources.cs
- CompiledRegexRunnerFactory.cs
- ContractReference.cs
- HealthMonitoringSection.cs
- BasicExpandProvider.cs
- Configuration.cs
- ValidationErrorCollection.cs
- TimeEnumHelper.cs
- DataSvcMapFileSerializer.cs
- XmlSchemaValidator.cs
- ScriptReference.cs
- PKCS1MaskGenerationMethod.cs
- DesignerUtility.cs
- SourceItem.cs
- ProfileGroupSettings.cs
- ResourceProviderFactory.cs
- UrlPath.cs
- SiteMapPath.cs
- RegisteredArrayDeclaration.cs