Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to drop/discard a Request in ASP.NET

How to drop/discard a Request in ASP.NET

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomtutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Waleed Eissa
    wrote on last edited by
    #1

    I'm trying to figure out how to drop/discard a request (in the BeginRequest event handler in an HttpModule), any idea how I can do this? Calling Response.End() sends the output to the user which is not what I want. Response.Close() closes the socket but as far I know (and correct me if I'm wrong) it also sends a packet to the client to notify them that the connection was closed. I'm trying to implement a black list of IPs in my app, I just want to drop/ignore/discard the request as if it was never received by the application.

    Waleed Eissa Software Developer Sydney

    M 1 Reply Last reply
    0
    • W Waleed Eissa

      I'm trying to figure out how to drop/discard a request (in the BeginRequest event handler in an HttpModule), any idea how I can do this? Calling Response.End() sends the output to the user which is not what I want. Response.Close() closes the socket but as far I know (and correct me if I'm wrong) it also sends a packet to the client to notify them that the connection was closed. I'm trying to implement a black list of IPs in my app, I just want to drop/ignore/discard the request as if it was never received by the application.

      Waleed Eissa Software Developer Sydney

      M Offline
      M Offline
      m khansari
      wrote on last edited by
      #2

      hi i think that you can use an ISAPI if you want to prevent some request to your web application. bye.

      MK4

      modified on Saturday, November 1, 2008 10:27 AM

      W 1 Reply Last reply
      0
      • M m khansari

        hi i think that you can use an ISAPI if you want to prevent some request to your web application. bye.

        MK4

        modified on Saturday, November 1, 2008 10:27 AM

        W Offline
        W Offline
        Waleed Eissa
        wrote on last edited by
        #3

        Wow, ISAPI filter to do such simple task! Isn't there a simpler way? I'm going to use IIS7 for my app, can this make it easier to do without having to use an ISAPI filter?

        Waleed Eissa Software Developer Sydney

        M 1 Reply Last reply
        0
        • W Waleed Eissa

          Wow, ISAPI filter to do such simple task! Isn't there a simpler way? I'm going to use IIS7 for my app, can this make it easier to do without having to use an ISAPI filter?

          Waleed Eissa Software Developer Sydney

          M Offline
          M Offline
          m khansari
          wrote on last edited by
          #4

          hi I don't work with IIS7 and don't know how to work but i know that IIS7 has some features that IIS 5,6 does not. Sorry bye.

          MK4

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups