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 ?
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:
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.
Member
263 Points
236 Posts
HttpHandler path syntax for path/folder only
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" />
Contributor
2380 Points
688 Posts
Re: HttpHandler path syntax for path/folder only
Dec 24, 2012 04:25 AM|vipuldonga|LINK
hi,
I think u want this way..
<add verb="*" path="*.jpg" name="myHH" type="myHH" />
Vipul Donga
Mark it as an answer, if it helped
if (MyAnswer)
MarkAsAnswer();
else
Repsonse.Write("correct me where i am wrong");
Member
263 Points
236 Posts
Re: HttpHandler path syntax for path/folder only
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"
Contributor
4917 Points
701 Posts
Re: HttpHandler path syntax for path/folder only
Jan 01, 2013 03:58 AM|Steven Cheng - MSFT|LINK
Hi Kelmen,
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 http://www.asp.net/web-forms/tutorials/aspnet-45/getting-started-with-aspnet-45-web-forms/url-routing
#URL Routing with ASP.NET 4.0 http://www.codeproject.com/Articles/77199/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 h
ttp://www.iis.net/learn/application-frameworks/building-and-running-aspnet-applications/how-to-take-advantage-of-the-iis-integrated-pipeline
#Enhance Your Apps with the Integrated ASP.NET Pipeline
http://msdn.microsoft.com/en-us/magazine/cc135973.aspx
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue.