Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Management / IisTraceWebEventProvider.cs / 1305376 / 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 //////////// 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 //////////// 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
- ipaddressinformationcollection.cs
- TrackBarRenderer.cs
- RsaSecurityToken.cs
- UIServiceHelper.cs
- Pen.cs
- HierarchicalDataBoundControl.cs
- InternalConfigEventArgs.cs
- EditorZone.cs
- PrintDialog.cs
- JavaScriptSerializer.cs
- SqlBulkCopyColumnMappingCollection.cs
- PieceNameHelper.cs
- SqlMethods.cs
- MediaContextNotificationWindow.cs
- UserNamePasswordValidator.cs
- MenuStrip.cs
- WebBrowser.cs
- PropertyMap.cs
- HtmlShim.cs
- LayoutManager.cs
- XsltConvert.cs
- ObsoleteAttribute.cs
- GeometryDrawing.cs
- CellLabel.cs
- webbrowsersite.cs
- NotImplementedException.cs
- EntitySet.cs
- AspNetHostingPermission.cs
- DataObjectMethodAttribute.cs
- ViewBase.cs
- SerialReceived.cs
- DbProviderSpecificTypePropertyAttribute.cs
- PackageFilter.cs
- BlockUIContainer.cs
- NavigationPropertyAccessor.cs
- TokenBasedSetEnumerator.cs
- AutomationPropertyInfo.cs
- ObjectView.cs
- CardSpaceSelector.cs
- CapabilitiesRule.cs
- CommandPlan.cs
- TypeDefinition.cs
- AnnouncementSendsAsyncResult.cs
- TextTreeInsertElementUndoUnit.cs
- HyperLinkColumn.cs
- RemotingServices.cs
- Highlights.cs
- DashStyle.cs
- NotSupportedException.cs
- Table.cs
- TextRunCacheImp.cs
- ApplicationFileParser.cs
- PageCache.cs
- ProcessManager.cs
- WebControlAdapter.cs
- DocumentReferenceCollection.cs
- HttpServerUtilityWrapper.cs
- IPHostEntry.cs
- MultiView.cs
- DisplayMemberTemplateSelector.cs
- HttpCookieCollection.cs
- ColumnWidthChangedEvent.cs
- BoolLiteral.cs
- DebugManager.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- SamlAudienceRestrictionCondition.cs
- SkinBuilder.cs
- __Filters.cs
- followingsibling.cs
- WebPartHeaderCloseVerb.cs
- ComplexBindingPropertiesAttribute.cs
- BaseDataList.cs
- AlignmentYValidation.cs
- XsdDuration.cs
- DataViewManager.cs
- sqlmetadatafactory.cs
- InputProviderSite.cs
- ObjectListField.cs
- SymbolType.cs
- WebBrowserBase.cs
- MessageFault.cs
- ToolStripGrip.cs
- WindowsSlider.cs
- SimpleRecyclingCache.cs
- DSASignatureDeformatter.cs
- _CookieModule.cs
- _NegoState.cs
- MediaPlayer.cs
- ListViewDeletedEventArgs.cs
- ComponentResourceKeyConverter.cs
- CodeTypeReference.cs
- TaiwanLunisolarCalendar.cs
- EventRouteFactory.cs
- PackagePartCollection.cs
- DbConnectionClosed.cs
- HtmlAnchor.cs
- SharedStatics.cs
- Recipient.cs
- PropertyReference.cs
- HtmlSelect.cs