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
- ProcessHostFactoryHelper.cs
- CommandBinding.cs
- SqlRemoveConstantOrderBy.cs
- SelectionProviderWrapper.cs
- CmsUtils.cs
- PhysicalOps.cs
- RichTextBox.cs
- ScopelessEnumAttribute.cs
- SecurityPermission.cs
- Stack.cs
- HostProtectionPermission.cs
- DynamicExpression.cs
- IsolationInterop.cs
- ExpressionPrefixAttribute.cs
- unsafenativemethodstextservices.cs
- RemoteCryptoTokenProvider.cs
- Method.cs
- LineServices.cs
- RequestUriProcessor.cs
- SQLRoleProvider.cs
- RegexMatch.cs
- ProcessHost.cs
- IntegerValidatorAttribute.cs
- ConfigXmlElement.cs
- TabItem.cs
- PromptEventArgs.cs
- ByteViewer.cs
- StrongName.cs
- AppSettings.cs
- NetworkCredential.cs
- XmlDictionaryWriter.cs
- InternalTypeHelper.cs
- HashCodeCombiner.cs
- _TimerThread.cs
- DateTimeConstantAttribute.cs
- SimpleHandlerBuildProvider.cs
- ServiceOperation.cs
- GlyphTypeface.cs
- NativeConfigurationLoader.cs
- LocalizationCodeDomSerializer.cs
- InstancePersistenceContext.cs
- NavigatorInput.cs
- DataPointer.cs
- PropertyConverter.cs
- ChannelSettingsElement.cs
- PreservationFileReader.cs
- GridViewSortEventArgs.cs
- EntityKeyElement.cs
- HttpHostedTransportConfiguration.cs
- ExtendedTransformFactory.cs
- Timer.cs
- HttpModuleCollection.cs
- RelationshipFixer.cs
- XNameConverter.cs
- FaultContext.cs
- SQLRoleProvider.cs
- DebugView.cs
- StatusBarDrawItemEvent.cs
- MenuItemBindingCollection.cs
- Soap.cs
- DoubleAnimationBase.cs
- MobileControlDesigner.cs
- PackWebResponse.cs
- XmlSchemaInfo.cs
- XLinq.cs
- RegexMatchCollection.cs
- CompilerScope.Storage.cs
- PassportIdentity.cs
- CoTaskMemHandle.cs
- TimeEnumHelper.cs
- Activity.cs
- ComNativeDescriptor.cs
- PropertyEntry.cs
- ConstructorExpr.cs
- SqlDataReader.cs
- TreeIterators.cs
- KnownBoxes.cs
- OleDbConnection.cs
- SeparatorAutomationPeer.cs
- PassportIdentity.cs
- GridViewAutomationPeer.cs
- HtmlProps.cs
- EventManager.cs
- TableSectionStyle.cs
- EntityClassGenerator.cs
- Help.cs
- BamlLocalizabilityResolver.cs
- ServiceControllerDesigner.cs
- SQLBytes.cs
- XPathChildIterator.cs
- CodeSubDirectory.cs
- EnumConverter.cs
- TemplateBindingExtensionConverter.cs
- XmlSchemaImporter.cs
- SplitterEvent.cs
- TransformPattern.cs
- DbConnectionFactory.cs
- MailSettingsSection.cs
- JsonQNameDataContract.cs
- RelationshipManager.cs