Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / HTTPNotFoundHandler.cs / 1 / 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; } } } }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
- TemplateManager.cs
- SettingsBindableAttribute.cs
- DbMetaDataColumnNames.cs
- BindStream.cs
- CodeTypeReferenceExpression.cs
- XmlSchemaSequence.cs
- TypeUtils.cs
- ManualWorkflowSchedulerService.cs
- DateTimeEditor.cs
- SyndicationLink.cs
- WebBrowserNavigatedEventHandler.cs
- MetadataSource.cs
- FormViewInsertEventArgs.cs
- WindowsRichEditRange.cs
- _HeaderInfo.cs
- ObjectConverter.cs
- _NegoStream.cs
- HideDisabledControlAdapter.cs
- NameValueConfigurationElement.cs
- mil_commands.cs
- RadioButtonList.cs
- RepeaterItem.cs
- ViewValidator.cs
- ViewService.cs
- SignatureToken.cs
- FileDialogPermission.cs
- ContainerControl.cs
- RemotingConfiguration.cs
- Scalars.cs
- XmlCollation.cs
- ChameleonKey.cs
- RemoteHelper.cs
- StructuralCache.cs
- ScriptMethodAttribute.cs
- XmlSchemaSimpleTypeUnion.cs
- ServiceMemoryGates.cs
- XmlElement.cs
- KeyValuePair.cs
- XmlnsDefinitionAttribute.cs
- UpDownEvent.cs
- WebPartConnectionsCloseVerb.cs
- Oci.cs
- Point3DCollectionConverter.cs
- ApplicationInfo.cs
- HitTestParameters3D.cs
- DecimalKeyFrameCollection.cs
- PassportAuthenticationEventArgs.cs
- AliasExpr.cs
- AutomationProperties.cs
- Transform3DGroup.cs
- WebPartZone.cs
- Baml2006KeyRecord.cs
- CompositionAdorner.cs
- PageRequestManager.cs
- DoWhile.cs
- PeerNameRegistration.cs
- PreservationFileWriter.cs
- MenuItemAutomationPeer.cs
- NonBatchDirectoryCompiler.cs
- DiscardableAttribute.cs
- XmlTextAttribute.cs
- FrameDimension.cs
- Currency.cs
- RewritingSimplifier.cs
- GPRECT.cs
- SqlDataSourceView.cs
- ClientSection.cs
- AutomationTextAttribute.cs
- OutputCacheSettingsSection.cs
- SimpleBitVector32.cs
- WindowsGraphics.cs
- TextDataBindingHandler.cs
- MULTI_QI.cs
- DBCSCodePageEncoding.cs
- InvariantComparer.cs
- WebPartDisplayModeCancelEventArgs.cs
- RbTree.cs
- RC2.cs
- SchemaEntity.cs
- EntityDataSourceChangedEventArgs.cs
- DbgCompiler.cs
- TargetException.cs
- CompoundFileIOPermission.cs
- Hashtable.cs
- PKCS1MaskGenerationMethod.cs
- BaseAppDomainProtocolHandler.cs
- FrameworkElement.cs
- DataGridViewColumnCollection.cs
- safesecurityhelperavalon.cs
- PersonalizationProvider.cs
- SignatureDescription.cs
- PopupRootAutomationPeer.cs
- ScriptHandlerFactory.cs
- TraceUtils.cs
- SettingsContext.cs
- AlignmentYValidation.cs
- DynamicDocumentPaginator.cs
- SecurityResources.cs
- LoginNameDesigner.cs
- HttpHandlerAction.cs