locked
HttpHandlers or HttpModules RRS feed

  • Question

  • User1492810447 posted

    Hi,

    I'm looking to try and check whether a user has a specific session set whenever they load any aspx page within my site.  If they do then they are allowed to stay on the page and view the site as per usual.  If not then they are redirected to a page where a value is selected in a drop down box and the session is set.

    I believe the easiest uproach is to use either HttpHandlers or HttpModules, however i'm not quite sure how to go about this.  Any help would be greatfully excepted.

    Thanks in advance

    Andy
    Thursday, August 11, 2005 7:37 AM

All replies

  • User1392434580 posted

    A HttpModule is going to be the best way of handling this.  A HttpHanlder responds to a request, a HttpModule inspects one and lets it pass on through.  You could in theory make a http handler work for this, but a HttpModule is going to be the most natural way of accomplishing this task.

    I can dig up codesamples if you'd like.

    Hope this Helps,

    Thursday, August 11, 2005 11:29 AM
  • User1492810447 posted
    That would be greate if you could thanks.
    Thursday, August 11, 2005 12:34 PM
  • User1761069259 posted
    is the Session object available in the httpmodule?
    Tuesday, August 30, 2005 5:42 PM
  • User1761069259 posted
    ...I found the answer myself:

    the common http objects are available with the following syntax:
    context.context.session
    context.context.request
    context.context.server etc...

    Tuesday, September 6, 2005 2:58 AM