1

Why ScrewTurn Wiki does use ashx type to create wiki page? Isn't it dangerous to create asp.net page on the fly?

update: they didn't create any physical pages. But how do they do that because the url is actually some-newpage.ashx ?

user310291
  • 36,946
  • 82
  • 271
  • 487

2 Answers2

3

I think it uses the .ashx to 1.) trigger the use of the ASP.NET isapi filter and 2.) signal that the requests aren't mapped to any physical files, but URLs mapped to logical pages within the Wiki engine.

And I don't think it's dangerous to create ASP.NET page responses on the fly, which is essentially what they do. It's actually a quite brilliant way to let you, the user of the system, build up the hierarchy of the web site.

Mikael Östberg
  • 16,982
  • 6
  • 61
  • 79
3

Does it actually really craete pages on the fiy on disc?

An ashx is a handler. It returns output as it wants. You can have a CMS that exposes it's tree thruogh a .ashx in between (/cms.ashx/some/page) but the pages NEVER EXIST.

TomTom
  • 61,059
  • 10
  • 88
  • 148
  • Hmm I checked and true they didn't create any physical pages. But how do they do that because the url is actually some-newpage.ashx ? – user310291 Apr 18 '11 at 12:21
  • They redirect all requests to ASP.NET and handle it in code. Trivial to do. Harder to set up on IIS 6 (because IIS 6 per standard setup ONLY redirects to .NET when it finds a FILE), but anything higher this is a standard web.config setup. – TomTom Apr 18 '11 at 12:31
  • actually there is a Wilcard setting you can use. But then you get everything routed via ASP.NET Isapi. – Mikael Östberg Apr 18 '11 at 13:59
  • Yes, but this requires changing the metabase which in IIS 6 times was NOT something hosters allowed you. Control panels definitely do not. So, it was at least (!) a support incident, mostly answered with "no". Any sensible developer at those times would try programming around this. WIth IIS7 that changed - now it is web.config controlled. – TomTom Apr 18 '11 at 14:14