Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / HTTPNotFoundHandler.cs / 1305376 / HTTPNotFoundHandler.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Synchronous Http request handler interface * * Copyright (c) 1998 Microsoft Corporation */ namespace System.Web { ////// internal class HttpNotFoundHandler : IHttpHandler { internal HttpNotFoundHandler() { } ///Provides a synchronous Http request handler interface. ////// public void ProcessRequest(HttpContext context) { PerfCounters.IncrementCounter(AppPerfCounter.REQUESTS_NOT_FOUND); throw new HttpException(404, SR.GetString(SR.Path_not_found, context.Request.Path)); } ///Drives web processing execution. ////// public bool IsReusable { get { return true; } } } internal class HttpForbiddenHandler : IHttpHandler { internal HttpForbiddenHandler() { } ///Indicates whether an HttpNotFoundHandler instance can be recycled and used /// for another request. ////// public void ProcessRequest(HttpContext context) { PerfCounters.IncrementCounter(AppPerfCounter.REQUESTS_NOT_FOUND); throw new HttpException(403, SR.GetString(SR.Path_forbidden, context.Request.Path)); } ///Drives web processing execution. ////// public bool IsReusable { get { return true; } } } ///Indicates whether an HttpForbiddenHandler instance can be recycled and used /// for another request. ////// internal class HttpMethodNotAllowedHandler : IHttpHandler { internal HttpMethodNotAllowedHandler() { } ///Provides a synchronous Http request handler interface. ////// public void ProcessRequest(HttpContext context) { throw new HttpException(405, SR.GetString(SR.Path_forbidden, context.Request.HttpMethod)); } ///Drives /// web processing execution. ////// public bool IsReusable { get { return true; } } } ///Indicates whether an HttpForbiddenHandler instance can be recycled and used /// for another request. ////// internal class HttpNotImplementedHandler : IHttpHandler { internal HttpNotImplementedHandler() { } ///Provides a synchronous Http request handler interface. ////// public void ProcessRequest(HttpContext context) { throw new HttpException(501, SR.GetString(SR.Method_for_path_not_implemented, context.Request.HttpMethod, context.Request.Path)); } ///Drives web processing execution. ////// public bool IsReusable { get { return true; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Indicates whether an HttpNotImplementedHandler instance can be recycled and /// used for another request. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolStripItemImageRenderEventArgs.cs
- ListViewHitTestInfo.cs
- CollectionViewGroup.cs
- BitmapInitialize.cs
- RoutedUICommand.cs
- lengthconverter.cs
- RuntimeComponentFilter.cs
- DrawTreeNodeEventArgs.cs
- TraceUtility.cs
- RealizedColumnsBlock.cs
- ResolveNameEventArgs.cs
- StsCommunicationException.cs
- OutputCacheProfile.cs
- LabelExpression.cs
- sqlinternaltransaction.cs
- AppDomainManager.cs
- FormViewInsertedEventArgs.cs
- RtfToXamlLexer.cs
- WebReferenceCollection.cs
- XmlReturnReader.cs
- ResumeStoryboard.cs
- Trace.cs
- FileAuthorizationModule.cs
- SafeFreeMibTable.cs
- PublisherIdentityPermission.cs
- TrackingServices.cs
- WindowsUpDown.cs
- RoleManagerEventArgs.cs
- RadioButtonBaseAdapter.cs
- OleDbParameter.cs
- System.Data_BID.cs
- x509store.cs
- TreeViewItem.cs
- CacheMemory.cs
- HttpApplication.cs
- LeafCellTreeNode.cs
- ChangeDirector.cs
- BitmapData.cs
- PropertyCondition.cs
- GradientSpreadMethodValidation.cs
- SamlAttributeStatement.cs
- FilterException.cs
- DeploymentSectionCache.cs
- MimeParameterWriter.cs
- OleDbCommand.cs
- ContainerControl.cs
- PowerStatus.cs
- Propagator.Evaluator.cs
- FieldValue.cs
- DeflateEmulationStream.cs
- FixedSOMLineRanges.cs
- AuthenticationModuleElementCollection.cs
- DataObjectSettingDataEventArgs.cs
- MetaModel.cs
- XmlHierarchyData.cs
- BuildDependencySet.cs
- StoreItemCollection.cs
- Guid.cs
- BindingManagerDataErrorEventArgs.cs
- XmlLanguageConverter.cs
- AdPostCacheSubstitution.cs
- TreeViewDesigner.cs
- SecurityTokenRequirement.cs
- SafeNativeMethods.cs
- HotSpotCollectionEditor.cs
- VideoDrawing.cs
- EnlistmentState.cs
- ArrayElementGridEntry.cs
- CheckBoxPopupAdapter.cs
- SimpleWebHandlerParser.cs
- MsmqHostedTransportManager.cs
- DataReceivedEventArgs.cs
- CapacityStreamGeometryContext.cs
- EntityCollectionChangedParams.cs
- IPCCacheManager.cs
- InboundActivityHelper.cs
- querybuilder.cs
- ApplicationManager.cs
- FocusChangedEventArgs.cs
- SqlNodeAnnotation.cs
- CustomErrorCollection.cs
- EmissiveMaterial.cs
- ViewEventArgs.cs
- RectAnimationBase.cs
- PropertyValueEditor.cs
- ScrollProviderWrapper.cs
- future.cs
- SourceCollection.cs
- RuntimeHandles.cs
- ServicesSection.cs
- MembershipPasswordException.cs
- ConstantCheck.cs
- EntityDataSourceChangingEventArgs.cs
- FixedPageAutomationPeer.cs
- ActivityFunc.cs
- FormCollection.cs
- CapiNative.cs
- ResolveNameEventArgs.cs
- DocumentEventArgs.cs
- AtomicFile.cs