Last post Jan 01, 2013 03:58 AM by Steven Cheng - MSFT
Dec 24, 2012 01:28 AM|Kelmen|LINK
say, I want to invoke my custom httphandler for any localhost/abc/def or localhost/xyz , that the url are just folder/path only, not specific resource like a.jpg or b.aspx or c.html
what's the syntax for the path attribute in the config ?
<add verb="*" path="???" name="myHH" type="myHH" />
Dec 24, 2012 04:25 AM|vipuldonga|LINK
I think u want this way..
<add verb="*" path="*.jpg" name="myHH" type="myHH" />
Dec 25, 2012 11:25 PM|Kelmen|LINK
no, that is specific to jpg file
as my question is to handle by folder only, not filename (with dot/file extension)
like localhost/Service, whereby this Service is either a folder/subfolder, or a logical url from UrlRouting
I want myHH to intercept these type of "resource"
Jan 01, 2013 03:58 AM|Steven Cheng - MSFT|LINK
Would you consider the URL routing feature of ASP.NET 4.0 (originally used for ASP.NET MVC) which can help you redirect folder like (or other custom path synatx) to your standard page:
#URL Routing with ASP.NET 4.0
generally, if you want to setup such routing via raw httphandler, you need to make sure the IIS server application pool is configured to use "integrated" pipeline mode.
#How to Take Advantage of the IIS 7.0 Integrated Pipeline
#Enhance Your Apps with the Integrated ASP.NET Pipeline