Virtual Path Providers

S

shaun.berryman

I have a quick question in regards to Virtual Path Providers (VPP) as
I've been trying to determine if going that route for URL Rewriting
is the best path.

First let me tell you that I've been scouring the internet to find
some good examples of VPP in use for Rewriting and it had been
difficult. MSDN posted a good article about their URI scheme at
(http://msdn.microsoft.com/msdnmag/issues/05/02/InsideMSDN/) which gave
a good insight on using IHttpModules and using RewritePath to a fake
file so the VPP would pick it up.

I would personally like to take the path of chaining the processing of
my URL's. I will try and explain what I'm referring to using the
following URL as an example:

http://sandiego.shaun.com/people/Will/Pictures

First I would like to break the URL up into manageable tokens.

1. First I would like to break up the host (sandiego.shaun.com) by
parsing out the location (sandiego) and placing that info into the
application context.
2. Second I would take the first token "people" and compare that to
a list recognized tokens. As part of a "recognized" token it would
include a path to some other entity that would further process the
remaining tokens (if they exist.) I would assume I could pass the
request to say "People.aspx"
3. "People.aspx" would either display a list of people if no more
tokens exist in the URL or would parse the remaining tokens and move
down the chain.

Is this something that I should do by creating a LONG list of regular
expressions that would be sorted by most descriptive to the least and
use RewritePath or can you point me in the right direction? I am not
looking for a solution per se but more of some advice on which
direction I should take. I am not opposed to having a single
"default.aspx" page and loading User Controls down the chain. I
feel like that path is something that would have been done back in the
pre .NET days.

Thanks,
Shaun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top