![]() |
|
|
#1 (permalink) |
|
Registered User
Join Date: Dec 2005
Posts: 7
|
Processing .txt, .gif etc in ASP.NET
Hi folks,
I am currently writing a HttpModule that converts "unfriendly" URLs to friendly ones. One of the things I would like to do is map: ~/username/mytag.gif to ~/mytag.ashx?user=username I can do this easily for a file with extension .apsx, but for other file extensions (gif, png, txt, zip) which I would like to reroute internally in this way it doesn't work. I'm assuming that this is because IIS sees the .gif extension, and never gets ASP.NET involved (hence my HttpModule is never invoked). Is there any way in the Catalyst2 environment to make ALL requests pass through ASP.NET so I can rewrite the URL in a HttpModule if requried? I can't see anything in HELM.... I know that IIS7 supports this better as the native pipeline supports ASP.NET HttpModules - you don't need to specifically redirect to ASP.NET. I can't really wait that long however...... |
|
|
|
|
|
#3 (permalink) |
|
Administrator
Join Date: Oct 2003
Posts: 1,484
|
Ian,
From a man talking from experience - routing everything through asp.net can have some issues. The biggest (and most obvious) is when dealing with none .net dynamic files. There are others. Also if your running a site with a high amount of traffic - there is also a perf issue. My suggestion would be just to re-route the static files extension you need and are actively handling. Role on II7 indeed - the pipeline in that is amazing. I'm still trying to find the limits! Jas
__________________
Jason Robbins jason@catalyst2.com |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|