Exclude certain pages from using a HTTPModule

前端 未结 3 1308
夕颜
夕颜 2020-12-03 21:28

Is there a good way to exclude certain pages from using a HTTP module?

I have an application that uses a custom HTTP module to validate a session. The HTTPModule is

3条回答
  •  误落风尘
    2020-12-03 21:39

    You could use an HTTPHandler instead of an HTTPModule. Handlers let you specify a path when you declare them in Web.Config.

    
    

    If you must use an HTTPModule, you could just check the path of the request and if it's one to be excluded, bypass the validation.

提交回复
热议问题