Code:
/ 4.0 / 4.0 / 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. ///// 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
- References.cs
- DataGridViewCellEventArgs.cs
- StatusBar.cs
- OleDbPermission.cs
- TextEffect.cs
- HttpContext.cs
- ControlPersister.cs
- ErrorFormatterPage.cs
- WebPartVerb.cs
- coordinator.cs
- HtmlInputSubmit.cs
- ScopedMessagePartSpecification.cs
- SafeEventLogReadHandle.cs
- SetIterators.cs
- SQLBinary.cs
- TransformerInfo.cs
- XmlRootAttribute.cs
- ToolStripControlHost.cs
- XmlBaseReader.cs
- MultiBindingExpression.cs
- MatrixUtil.cs
- GridViewDeleteEventArgs.cs
- PointHitTestResult.cs
- DllHostedComPlusServiceHost.cs
- TimeEnumHelper.cs
- ResolveNameEventArgs.cs
- SqlFacetAttribute.cs
- InkCanvasAutomationPeer.cs
- TableItemProviderWrapper.cs
- ListSortDescriptionCollection.cs
- DeploymentSectionCache.cs
- TaiwanLunisolarCalendar.cs
- ReadOnlyDataSource.cs
- DomainUpDown.cs
- EntityDataSourceMemberPath.cs
- HtmlHistory.cs
- RegexMatchCollection.cs
- X509CertificateChain.cs
- TextElementAutomationPeer.cs
- Int16Animation.cs
- ListDictionaryInternal.cs
- RuntimeCompatibilityAttribute.cs
- _UriTypeConverter.cs
- RenderContext.cs
- TextEffectCollection.cs
- CompilationRelaxations.cs
- Localizer.cs
- SByteStorage.cs
- DbModificationCommandTree.cs
- NamedPermissionSet.cs
- NTAccount.cs
- ClientUtils.cs
- ComplexPropertyEntry.cs
- IndicCharClassifier.cs
- FlatButtonAppearance.cs
- SqlDelegatedTransaction.cs
- UxThemeWrapper.cs
- ArcSegment.cs
- SafeMILHandle.cs
- SmiContext.cs
- TrustManager.cs
- DetailsViewRowCollection.cs
- HashAlgorithm.cs
- DeviceContext.cs
- ExpressionBuilderContext.cs
- SerializationException.cs
- PopupControlService.cs
- CheckBoxStandardAdapter.cs
- JobInputBins.cs
- Label.cs
- ServiceCredentialsElement.cs
- CodeMemberField.cs
- DaylightTime.cs
- PersonalizationStateQuery.cs
- TemplateControlParser.cs
- TemplateControl.cs
- X509SubjectKeyIdentifierClause.cs
- CodeLinePragma.cs
- WebPartUtil.cs
- TypeDescriptor.cs
- HtmlInputSubmit.cs
- autovalidator.cs
- CellRelation.cs
- TraceListener.cs
- WebPartConnectionCollection.cs
- BasePattern.cs
- VSWCFServiceContractGenerator.cs
- SerializationException.cs
- ILGenerator.cs
- securitycriticaldata.cs
- SqlDuplicator.cs
- LabelLiteral.cs
- SqlCacheDependencyDatabaseCollection.cs
- _StreamFramer.cs
- Compiler.cs
- TextSpanModifier.cs
- DataColumnCollection.cs
- SmtpMail.cs
- EventSetter.cs
- StylusEditingBehavior.cs