Skip to first unread message

Tim Heuer

Dec 12, 2011, 2:30:56 PM12/12/11
to Subtext
I'm just getting around to upgrading to 2.5 and some things are
missing that I had previously customized (and weren't caught/warned by
the upgrade tool).

One that I can't identify the new pattern is to do custom handlers.
In 2.1 I had this in my web.config:

<HandlerConfiguration defaultPageLocation="DTP_.aspx"
<HttpHandler pattern="(?:/about\.aspx)$" controls="about.ascx"/>

Where do I place that now? I'm not on IIS7.

Tim Heuer

Mar 31, 2012, 9:45:25 PM3/31/12
Bump on this one...any ideas?
Basically how to now create a static page that isn't a post/article?

Travis Illig

Apr 2, 2012, 11:36:21 AM4/2/12
I was able to make a page that was part of the Admin area, but I'm not sure that will help. The way I did it, I derived the ASPX from the same base AdminPage class as the other admin pages and copied over the content regions and things. (I am also not on IIS7).

A lot of stuff went to routing in the latest version but Global.asax is pre-compiled now, so you can't really derive/override/replace it with your own. What I would try is creating an HttpModule and during Init map a route to your handler. No promises, but it's something to try.

Travis Illig

May 24, 2012, 12:36:15 PM5/24/12
OK, I have an idea (since I'm now trying to do this myself).

Try putting the page in the /images/ folder or below. There's a hardcoded line in Subtext.Framework.Web.HttpModules.BlogRequest that basically says "if this isn't a static file and it's not in the /images/ folder, then handle it as a blog request." I was able to put a test page inside the images folder and it executed correctly.

I'll file an issue to see if we can get something better, like a configurable exclusion list or something.

Travis Illig

May 24, 2012, 1:25:59 PM5/24/12
I double-verified that this works. If you put it under /images/ you can add any file you want. It sucks that it has to be under /images/, but for now that's the workaround.

I filed an issue on GitHub to see if we can get a configurable exclusion list.
Reply all
Reply to author
0 new messages