HttpContext Error in ObjectDataSource Data-retrieval Method
|Progress® Telerik® Reporting
HttpContext.Current.User is not available.
The data-retrieval method is executed in a different context where the current user's information is not transferred.
HttpContext.Current.User is not available in the data-retrieval method executed by an ObjectDataSource component. This is a result of the data-retrieval method being executed in a different context where the current user's information is not available.
You can parameterize the data-retrieval method and pass the
ID of the user (as
String) via report parameter e.g. Using Parameters with the ObjectDataSource Component. In the data-retrieval method you can use the passed
ID or re-retrieve the users' information.
If you are using the HTML5 Viewer and Reporting REST WebAPI based service, to secure the information transferred in requests, please consider encrypting it and using
HTTPS. The current context and user will be available in the Reporting REST service's methods. If you need to check and compare the client(viewer)'s information on the server, you can override the ReportsControllerBase methods like