Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Jan 27, 2009 @ 10:50
    Scott Hugh Alexandar Petersen
    0

    how to create httpmodules which inherits from umbraco

    Hey everybody,

    Can someone come up with a short example of how to create an httpmodule which will be able to run the OnSession_Start event on application level.

    Thank you.

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 27, 2009 @ 11:13
    Ismail Mayat
    0

    Scott,

    You would need to update the source and code in global.asax to wire up your events or you could try something that fed suggested i this post its near the bottom. The first suggestion means that everytime you upgrade you would need to update source code and compile / deploy.

    The second suggestion will mean that every page on your site will hit the event and not just that session ?

    Regards

    Ismail

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Jan 27, 2009 @ 11:15
    Scott Hugh Alexandar Petersen
    0

    Hey Ismail,

    Thank you for your reply. I got the point there. Can you or someone else just come up with a simple httpmodule?

    Thank you.

  • Niels Hartvig 1951 posts 2391 karma points admin hq c-trib
    Jan 27, 2009 @ 11:40
    Niels Hartvig
    0

    If you just wants to ban a user, simply do it in the BeginRequest event. That way your httpmodule is completely independent of anything and doesn't need to be tied with umbraco. Place the httpmodule first in the list in the web.config and it'll have a higher priority than the umbraco http module. Simple, clean.

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Jan 27, 2009 @ 13:02
    Scott Hugh Alexandar Petersen
    0

    Oooh thank you - that was a good idea :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies