Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //Indicates whether an HttpNotImplementedHandler instance can be recycled and /// used for another request. ///// 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. // Copyright (c) Microsoft Corporation. All rights reserved.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
- WindowsFormsEditorServiceHelper.cs
- MapPathBasedVirtualPathProvider.cs
- OutKeywords.cs
- TemplateControl.cs
- FormViewInsertedEventArgs.cs
- DelegateTypeInfo.cs
- CaretElement.cs
- SqlNodeTypeOperators.cs
- HttpGetProtocolReflector.cs
- ProgressBarAutomationPeer.cs
- DbConnectionHelper.cs
- ViewCellRelation.cs
- FlowDecision.cs
- TriState.cs
- TextCollapsingProperties.cs
- Privilege.cs
- NullReferenceException.cs
- SortedList.cs
- ProtocolsConfigurationHandler.cs
- UnsafeMethods.cs
- SpecialFolderEnumConverter.cs
- UnsupportedPolicyOptionsException.cs
- Facet.cs
- Subordinate.cs
- BinaryParser.cs
- Connector.xaml.cs
- X509IssuerSerialKeyIdentifierClause.cs
- WorkflowEnvironment.cs
- StubHelpers.cs
- ProfessionalColorTable.cs
- FormsAuthenticationCredentials.cs
- ConsumerConnectionPoint.cs
- COM2ICategorizePropertiesHandler.cs
- UriScheme.cs
- UpDownEvent.cs
- DrawingContext.cs
- DropShadowBitmapEffect.cs
- ImageAttributes.cs
- HttpConfigurationContext.cs
- NamespaceCollection.cs
- LocationReferenceValue.cs
- Rotation3DAnimationUsingKeyFrames.cs
- DesignerSerializationOptionsAttribute.cs
- AssemblyAttributesGoHere.cs
- PanelStyle.cs
- IntranetCredentialPolicy.cs
- SelectedGridItemChangedEvent.cs
- MailSettingsSection.cs
- QilStrConcatenator.cs
- ValidateNames.cs
- ChtmlTextWriter.cs
- PointCollectionValueSerializer.cs
- ExpressionBuilderContext.cs
- WindowsPrincipal.cs
- StorageBasedPackageProperties.cs
- HtmlTextArea.cs
- ResourceDescriptionAttribute.cs
- BindingList.cs
- PrivilegedConfigurationManager.cs
- DirectoryNotFoundException.cs
- MsmqHostedTransportConfiguration.cs
- DataControlReferenceCollection.cs
- ToolboxComponentsCreatingEventArgs.cs
- IntSecurity.cs
- SafeRegistryHandle.cs
- SqlGenericUtil.cs
- WindowsGraphicsCacheManager.cs
- MdbDataFileEditor.cs
- StorageTypeMapping.cs
- Annotation.cs
- GraphicsContainer.cs
- DataSourceCache.cs
- HttpListenerResponse.cs
- LocatorPart.cs
- handlecollector.cs
- AutoResetEvent.cs
- TraceEventCache.cs
- StringUtil.cs
- SpnEndpointIdentityExtension.cs
- FontFaceLayoutInfo.cs
- BasicDesignerLoader.cs
- AutomationEvent.cs
- CodeSubDirectoriesCollection.cs
- ConstructorExpr.cs
- CodeStatementCollection.cs
- ProfilePropertyMetadata.cs
- WebUtil.cs
- GeometryDrawing.cs
- BitmapEffectRenderDataResource.cs
- ObjectIDGenerator.cs
- FamilyMapCollection.cs
- MDIControlStrip.cs
- X509Certificate2Collection.cs
- DebugView.cs
- GenerateHelper.cs
- EntityDataSourceContainerNameConverter.cs
- SqlCommandSet.cs
- DeploymentSectionCache.cs
- SimpleHandlerBuildProvider.cs
- XmlSortKeyAccumulator.cs