catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Scripting Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 30-01-2008, 11:46 AM   #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......
IanStevenson is offline   Reply With Quote
Old 30-01-2008, 03:09 PM   #2 (permalink)
Bring me your problems :p
 
paulredpath's Avatar
 
Join Date: Jan 2003
Location: /dev/ahhhhhhhhh
Posts: 3,537
Ian,

Thanks for your ticket, we are making the changes for you.
paulredpath is offline   Reply With Quote
Old 30-01-2008, 03:34 PM   #3 (permalink)
Administrator
 
WhiskyFudge's Avatar
 
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
WhiskyFudge is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:08 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.