web handler or something like that

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have some problem. My old site had thousand pages which looks like
“info_[subj].asp†and I did modification and now all content in database and
I can show it like this
“info_page.aspx?search=[subj]â€
It means now I have only one page which show text of all those page from
database where key param is [subj], but before it was part of page name.

For example,
Before
http://somesite.com/info_contacr_us.asp
Now
http://somesite.com/info_page.aspx?search=contact_us

And I have question here. How I can support old links if I don’t have those
files any more? It means some customer open old link and will be redirected
to new page.

As I know asp.net have some web handler type (Handler.ashx) and it looks
close to what I need, but I can’t found information how to use those files.
 
With ASP and no >NET installed, it is not easy, as you will have to write an
ISAPI filter, which means coding C++.

If you also have .NET enabled, you can use an HTTP Handler to turn the URL
into the new URL. You can do that for any URL in the site, so it is a way to
move into .NET without moving into .NET.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
give me an example how to make this HTTP Handler work for my problem.
I need some information about this.
 
While not 100% related, there is a good article here:
http://www.ftponline.com/vsm/2002_02/magazine/columns/qa/

It talks about hierarchical URLs in ASP.NET, like turning

http://www.mymagazine.com/April/2007/GuestArticle/101

into

http://www.mymagazine.com/Article.aspx?month=042007&article=101

Great little piece. May not get you 100% of the way, but it is a great
start.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
I can't open links from mymagazine.com site. I see just page with string for
search.
But nevermind.

So I read a lot about that stuff and now it looks cool but still few qestions.
So now I know
1) how make httpModules
it should be string in web.config
<httpModules>
< add name="HelloWorldModule" type="HelloWorldModule"/>
</httpModules>
And this class HelloWorldModule should by from IHttpModule interface.
It allow get control from all requests to site if singup on event
application.BeginRequest.

2) I know how to make HttpHandler
add to web.config
<httpHandlers>
<add verb="*" path="*.ashx" type="DukeHttpHandler" />
</httpHandlers>

and put this code file to APP_CODE which should be from IHttpHandler
interface. So when somebody ask any *.ashx file this code get event.
=============================================

BUT i don't realize how and for I can use Handler.ashx which studio
create by default. It have class from IHttpHandler interface but this class
don't
get event when I load some *.ashx file and I CAN'T map it to web.config
because this file not in APP_CODE folder.
So question is how I can use this file at all?
 
Back
Top