| title | CHttpModule::OnReadEntity Method |
|---|---|
| description | This article contains information about syntax, return value, and requirements for the CHttpModule::OnReadEntity method. |
| ms.date | 10/07/2016 |
| ms.assetid | 97ba205d-2c55-d9e1-c0b1-36928035fd74 |
Represents the method that will handle a ReadEntity event, which occurs when an operation reads data from the request buffer.
virtual REQUEST_NOTIFICATION_STATUS OnReadEntity(
IN IHttpContext* pHttpContext,
IN IReadEntityProvider* pProvider
); pHttpContext
[IN] A pointer to an IHttpContext interface.
pProvider
[IN] A pointer to an IReadEntityProvider interface.
A REQUEST_NOTIFICATION_STATUS value.
When a request-level module has registered for the RQ_READ_ENTITY event notification, IIS will call the module's OnReadEntity method when an operation reads data from the request buffer.
Note
Request-level modules can register for the PostReadEntity event notification by registering for RQ_READ_ENTITY in the module's RegisterModule function.
The following example demonstrates how to create a request-level HTTP module that registers for the RQ_READ_ENTITY event notification. When IIS reads data from the request buffer, it will call the example module's OnReadEntity method. A simple HTML or [!INCLUDEvstecasp] page that performs a post will cause the example code to run.
[!code-cppCHttpModuleReadEntity#1]
| Type | Description |
|---|---|
| Client | - IIS 7.0 on [!INCLUDEwinvista] - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
| Server | - IIS 7.0 on [!INCLUDEwinsrv2008] - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
| Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 - [!INCLUDEiisexp75], [!INCLUDEiisexp80], [!INCLUDEiisexp100] |
| Header | Httpserv.h |