whizkid gps

whizkid gps

  • NA
  • 3
  • 5.4k

Request filters in HttpModule

Mar 22 2015 11:22 AM

I’ve written HttpModule to catch every web request on my web application. HttpModule may receive more requests while navigating across web application. From here I want to filter the requests which are from .ASMX & .SVC alone.

We can apply the filter using below condition, but just want to know is there any other optimistic way instead of checking an extension.

(HttpContext.Current.Request.Path.Contains(".asmx")) || (HttpContext.Current.Request.Path.Contains(".svc"))

Answers (1)