DefaultHttpHandler.OnExecuteUrlPreconditionFailure Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when preconditions prevent the DefaultHttpHandler object from processing a request.
public:
virtual void OnExecuteUrlPreconditionFailure();
public virtual void OnExecuteUrlPreconditionFailure ();
abstract member OnExecuteUrlPreconditionFailure : unit -> unit
override this.OnExecuteUrlPreconditionFailure : unit -> unit
Public Overridable Sub OnExecuteUrlPreconditionFailure ()
Remarks
Preconditions are specified by the client in the request-header fields and are evaluated on the Web server. For example, by using preconditions, clients can prevent a requested method (for example, GET) from being applied to a resource other than the one intended. For more information, see section 14, "Header Field Definitions," in the Hypertext Transfer Protocol -- HTTP/1.1 specification on the World Wide Web Consortium (W3C) Web site.
The OnExecuteUrlPreconditionFailure method is called when preconditions prevent the DefaultHttpHandler object from processing a request. A deriving class might override the OnExecuteUrlPreconditionFailure method to throw an exception when the preconditions fail. The DefaultHttpHandler does not throw an exception in the OnExecuteUrlPreconditionFailure method.
Any of the following will cause the preconditions to fail:
Calling HttpResponse.Write.
Calling HttpResponse.AddHeader.
Calling HttpResponse.Flush.
Changing the cache policy for the response.
Adding a Stream object as a filter to the HttpResponse.Filter property.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기