This is a migrated thread and some comments may be shown as answers.

[Solved] access FileBrowserContentProvider from HttpHandler ProcessRequest

2 Answers 128 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 29 May 2009, 04:05 PM
Hello,

I am building a customization of  FIleBrowserContentProvider.

From within HttpHandler's ProcessRequest, is there a way to access the instance of FileBrowserContentProvider that "initiated" the http request, so that I can access some data that I need to get the file contents to serve?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Lini
Telerik team
answered on 01 Jun 2009, 01:04 PM
Hello,

The HTTP Handler works on a separate request, which means that you have no access to the controls (and their ViewState) on the page that started the request. If you need to send some data to your handler, you need to use alternative methods. For example, you can add some query string parameters to the request. If the data is too large for the request URL, you can serialize it and store it on the server (e.g. in the Session object).

Regards,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon
Top achievements
Rank 1
answered on 12 Jun 2009, 08:05 PM
Actually, now that you mention it, the minimum data that I need is already in Session, so, as you have suggested, I have added IRequiresSessionState to the handler and I can now access that session variable successfully. Thanks!

 

 

Tags
Editor
Asked by
Jon
Top achievements
Rank 1
Answers by
Lini
Telerik team
Jon
Top achievements
Rank 1
Share this question
or