DefaultHttpHandler.OnExecuteUrlPreconditionFailure Method
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 ()
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.
Produto | Versões |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: