Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AuthorizationRuleCollection.cs
- EmbeddedObject.cs
- BordersPage.cs
- CollectionMarkupSerializer.cs
- BitmapEffectCollection.cs
- BmpBitmapDecoder.cs
- Properties.cs
- RecordsAffectedEventArgs.cs
- CngKeyCreationParameters.cs
- VBCodeProvider.cs
- RoamingStoreFile.cs
- EventsTab.cs
- LeafCellTreeNode.cs
- HttpCacheParams.cs
- DbParameterCollection.cs
- Geometry.cs
- PointConverter.cs
- NullRuntimeConfig.cs
- ObjectViewEntityCollectionData.cs
- COAUTHINFO.cs
- XamlToRtfParser.cs
- ICollection.cs
- Span.cs
- HMAC.cs
- ToolboxItemCollection.cs
- TemplateXamlTreeBuilder.cs
- ZipFileInfo.cs
- DynamicILGenerator.cs
- PasswordTextNavigator.cs
- Atom10FeedFormatter.cs
- DataGridViewCell.cs
- AnnotationObservableCollection.cs
- IsolatedStorageFile.cs
- SoapFault.cs
- Matrix.cs
- IdentityManager.cs
- ParallelTimeline.cs
- PauseStoryboard.cs
- TemplateXamlParser.cs
- GeneralTransform3D.cs
- VolatileEnlistmentState.cs
- IPipelineRuntime.cs
- DataBoundLiteralControl.cs
- HostingEnvironmentSection.cs
- UnionCodeGroup.cs
- XmlILIndex.cs
- SimpleType.cs
- RecommendedAsConfigurableAttribute.cs
- ProfileSection.cs
- RequestCachingSection.cs
- CodeArgumentReferenceExpression.cs
- TriggerCollection.cs
- TemplateXamlTreeBuilder.cs
- GeometryGroup.cs
- oledbconnectionstring.cs
- SmiContext.cs
- HtmlContainerControl.cs
- HostVisual.cs
- QilNode.cs
- ChtmlPageAdapter.cs
- ReflectionServiceProvider.cs
- ColorConverter.cs
- ComponentDispatcher.cs
- PartitionedStreamMerger.cs
- DataGridViewCell.cs
- StorageAssociationTypeMapping.cs
- SmtpMail.cs
- Font.cs
- ToolboxItemImageConverter.cs
- InvokeMemberBinder.cs
- CommittableTransaction.cs
- Math.cs
- DataGridCellAutomationPeer.cs
- UseAttributeSetsAction.cs
- ExtensibleClassFactory.cs
- OleDbCommandBuilder.cs
- GridViewColumnCollection.cs
- SqlDataSourceStatusEventArgs.cs
- TraceData.cs
- externdll.cs
- ListView.cs
- SinglePhaseEnlistment.cs
- ReliableMessagingVersionConverter.cs
- PropertyTab.cs
- PeerCollaborationPermission.cs
- InfoCardCryptoHelper.cs
- WorkflowDefinitionDispenser.cs
- ToolStripItemImageRenderEventArgs.cs
- MouseButtonEventArgs.cs
- ProxyWebPart.cs
- DispatcherProcessingDisabled.cs
- CanonicalXml.cs
- GPRECTF.cs
- Stackframe.cs
- SectionInformation.cs
- Substitution.cs
- BaseTemplateBuildProvider.cs
- XmlComment.cs
- OlePropertyStructs.cs
- CommittableTransaction.cs