.NETGURU
Request procesor ...
Messages   Related Types
This message was discovered on ASPFriends.com 'aspnghttphandlers' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Aurelian POPA
I want to implememt the following:

1. when a user request let's say http://mysite.com/somefolder/page ,
my handler must search for a directory called page, and then for a page
called page.aspx,
and then for a page called page.asp and finally for a page named
page.html or page.htm
(maybe even a configurable feature for specifying order of seacrh is
welcomed)

2. if my root of site is located at c:\inetpub\wwwroot, I want to be able to
dinamically
(not with virtual folders)
mount site nodes like http://mysite.com/firstnode/page to local folder
located
upper in folder tree (for example page.aspx in
c:\www\packages\firstnode)

In this way it will be possible to request http://mysite/firstnode/page
and
this handler will "transfer" constrol to the
script page.aspx in c:\www\packages\firstnode

3. a way of passing URL folders as parameters to the aspx script ...
for example let's assume that I have an exchange rates page ...
something like:
    - http://mysite.com/exchange-rates.aspx?currency&#us;d&lang&#en; ;
I want to be able to request http://mysite.com/exchange-rates/en/usd/
instead of first ugly url ....

Why I want to do this?

- because regardless the technological evolution my links
will remain maintainable (in les than 5 years I moved from .htm to .asp
and now to .aspx ...)

- because, if I'll develop a module, called, let's say, ***news*** (some
aspx files grouped
in a single directory - c:\www\news), and my site have to sections
(http://mysite.com/first-dept and http://mysite.com/second-dept),
I want to be able to "mount" this module to both site sections;
of course there be a logic in the code which will present apropiate news
for each department ...
and both sites will have their own news corner :
(http://mysite.com/first-dept/news and http://mysite.com/second-dept/news)

If anyone know that this is possible with ASP.NET's httphandler,
please send me some url's or some proof-of-concept examples ...

Thanks,
Aurelian POPA

PS. I know that this is possible with ISAPI filters and/or extensions ...
but I hate C++ ...
Reply to this message...
 
    
Mitch Denny (VIP)
Aurelian,

1.    No need to do any development here. This is really a matter
    of tweaking an IIS setting to change the default documents,
    open up the properties for the web-site in the Internet
    Information Services MMC Snap-in; its under the Documents tab.

2.    I'm not sure how you would do these cleanly, my recommendation
    would be once again to avoid using handlers and just mount those
    directories physically under the root. Why add the complexity?

3.    You can do this using the Redirect(...) method on the Response
    object that is intrinsic to the Page class. Just place the page
    in your simple path and have it call that method.

The development methodology of .NET is slightly different than
working with Classic ASP. We aren't so much creating sites now
as we are creating applications. This mean we need to (hopefully)
do a little bit more design. Given your requirements, I am sure
a design could be built that causes no impact to your users.

Hope this helps.

----------------------------------------
- Mitch Denny
- http://www.warbyte.com
- Click here to reveal e-mail address
- +61 (414) 610-141
-

-----Original Message-----
From: Aurelian POPA [mailto:Click here to reveal e-mail address]
Sent: Wednesday, 1 August 2001 8:20 PM
To: aspnghttphandlers
Subject: [aspnghttphandlers] Request procesor ...
Importance: High

I want to implememt the following:
1. when a user request let's say http://mysite.com/somefolder/page ,
my handler must search for a directory called page, and then for a
page called page.aspx,
and then for a page called page.asp and finally for a page named
page.html or page.htm
(maybe even a configurable feature for specifying order of seacrh is
welcomed)
2. if my root of site is located at c:\inetpub\wwwroot, I want to be
able to dinamically
(not with virtual folders)
mount site nodes like http://mysite.com/firstnode/page to local
folder located
upper in folder tree (for example page.aspx in
c:\www\packages\firstnode)

In this way it will be possible to request
http://mysite/firstnode/page and
this handler will "transfer" constrol to the
script page.aspx in c:\www\packages\firstnode
3. a way of passing URL folders as parameters to the aspx script ...
for example let's assume that I have an exchange rates page ...
something like:
- http://mysite.com/exchange-rates.aspx?currency=usd&lang=en ;
I want to be able to request http://mysite.com/exchange-rates/en/usd/

instead of first ugly url ....
Why I want to do this?
- because regardless the technological evolution my links
will remain maintainable (in les than 5 years I moved from .htm to
.asp and now to .aspx ...)
- because, if I'll develop a module, called, let's say, ***news*** (some
aspx files grouped
in a single directory - c:\www\news), and my site have to sections
(http://mysite.com/first-dept and http://mysite.com/second-dept),
I want to be able to "mount" this module to both site sections;
of course there be a logic in the code which will present apropiate
news
for each department ...
and both sites will have their own news corner :
(http://mysite.com/first-dept/news and
http://mysite.com/second-dept/news)
If anyone know that this is possible with ASP.NET's httphandler,
please send me some url's or some proof-of-concept examples ...
Thanks,
Aurelian POPA
PS. I know that this is possible with ISAPI filters and/or extensions
...
but I hate C++ ...
| [aspnghttphandlers] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspnghttphandlers.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Peixin Han
SGksIEF1cmVsaWFuLA0KDQogDQoNClRoZXJlIGFyZSBzZXZlcmFsIHdheXMgdG8gZG8gdGhhdC4g
WW91IGNhbiB1c2UgSHR0cENvbnRleHQuUmV3cml0ZVBhdGgNCm9yIGltcGxlbWVudCB0aGUgaHR0
cGhhbmRsZXIgYnkgeW91cnNlbGYuIA0KDQogDQoNCllvdSBjYW4gZGVmaW5lIEFwcGxpY2F0aW9u
X0JlZ2luUmVxdWVzdCBpbiB5b3VyIGdsb2JhbC5hc2F4IGZpbGUsIGFuZA0KdXNlIEh0dHBDb250
ZXh0LlJld3JpdGVQYXRoIHRvIHRyYW5zZmVyIHRoZSByZXF1ZXN0IHRvIGFub3RoZXIgcGFnZS4g
Rm9yDQpleGFtcGxlLCBpbiBvcmRlciB0byByZXNvbHZlIHlvdXIgcXVlc3Rpb24gMywgeW91IGNh
bg0KDQo8c2NyaXB0IHJ1bmF0PXNlcnZlcj4NCg0KcHVibGljIHZvaWQgQXBwbGljYXRpb25fQmVn
aW5SZXF1ZXN0KCkgew0KDQpTdHJpbmcgcCA9IFJlcXVlc3QuRmlsZVBhdGg7DQoNCi8vUGFyc2Vy
IHRoZSBVUkwsIGdldCBlbiBhbmQgdXNkDQoNCuKApi4uDQoNCi8vR2VuZXJhdGUgYSBuZXcgVVJM
IHBhc3NpbmcgZW4gYW5kIHVzZCBhcyBxdWVyeXN0cmluZw0KDQpwID0g4oCcL2V4Y2hhbmdlLXJh
dGVzLmFzcHg/Y3VycmVuY3k94oCdICsgdXNkICsg4oCcJmxhbmd1YWdlPeKAnSArIGVuOw0KDQog
ICAgLy9QYXNzIHRoZSBuZXcgVVJMIHRvIENvbnRleHQuUm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KysgLi4uIA0KDQp8IFthc3BuZ2h0dHBoYW5kbGVyc10gbWVtYmVyIFBlaXhp
bkhAbWljcm9zb2Z0LmNvbSA9IFlPVVIgSUQNCnwgaHR0cDovL3d3dy5hc3BsaXN0cy5jb20vYXNw
bGlzdHMvYXNwbmdodHRwaGFuZGxlcnMuYXNwID0gSk9JTi9RVUlUDQp8IGh0dHA6Ly93d3cuYXNw
bGlzdHMuY29tL3NlYXJjaCA9IFNFQVJDSCBBcmNoaXZlcw0KDQo
Reply to this message...
 
    
Aurelian POPA
Hi Peixin,

many thanks...

what if this page is let's say "c:\www\page.aspx"
(I mean outside of my actual website - c:\inetpub\wwwroot)?
Is there a method like RewriteMappedPath or something ..?

Application_BeginRequest is not documented in beta2
can tell me other events .....?
Where can I find updated documentation?

Thanks ...

-----Original Message-----
From: Peixin Han [mailto:Click here to reveal e-mail address]
Sent: Wednesday, August 01, 2001 11:22 PM
To: aspnghttphandlers
Subject: [aspnghttphandlers] RE: Request procesor ...

Hi, Aurelian,

There are several ways to do that. You can use HttpContext.RewritePath or
implement the httphandler by yourself.

You can define Application_BeginRequest in your global.asax file, and use
HttpContext.RewritePath to transfer the request to another page. For
example, in order to resolve your question 3, you can

<script runat=server>

public void Application_BeginRequest() {

String p = Request.FilePath;

//Parser the URL, get en and usd

&#E2;P&#A6;..

//Generate a new URL passing en and usd as querystring

p = &#E2;P C;/exchange-rates.aspx?currency=&#E2;P D; + usd + &#E2;P C;&language=&#E2;P D; + en;

//Pass the new URL to Context.RewritePath. The execution will be
transfer to the new aspx page.

Context.RewritePath(p);

}

</script>

In order to call an asp page or html page, you can use
Context.Response.Redirect in Application_BeginRequest.

You can also implement this using httphandler. Here is an example.

public class abc : IHttpHandler

{

public virtual void ProcessRequest(HttpContext context)

{

if (page.aspx exist)

context.Response.Redirect("http://localhost/page/page.aspx";);

else &#E2;P&#A6;.

}

public virtual bool IsReusable

{

get { return true; }

}

}

Thanks,

-Peixin

-----Original Message-----
From: Aurelian POPA [mailto:Click here to reveal e-mail address]
Sent: Wednesday, August 01, 2001 03:20
To: aspnghttphandlers
Subject: [aspnghttphandlers] Request procesor ...
Importance: High

I want to implememt the following:

1. when a user request let's say http://mysite.com/somefolder/page
<http://mysite.com/somefolder/page> ,
my handler must search for a directory called page, and then for a page
called page.aspx,
and then for a page called page.asp and finally for a page named
page.html or page.htm
(maybe even a configurable feature for specifying order of seacrh is
welcomed)

2. if my root of site is located at c:\inetpub\wwwroot, I want to be able to
dinamically
(not with virtual folders)
mount site nodes like http://mysite.com/firstnode/page
<http://mysite.com/firstnode/page> to local folder located
upper in folder tree (for example page.aspx in
c:\www\packages\firstnode)

In this way it will be possible to request http://mysite/firstnode/page
<http://mysite/firstnode/page> and
this handler will "transfer" constrol to the
script page.aspx in c:\www\packages\firstnode

3. a way of passing URL folders as parameters to the aspx script ...
for example let's assume that I have an exchange rates page ...
something like:
- http://mysite.com/exchange-rates.aspx?currency=usd&" target="_blank">http://mysite.com/exchange-rates.aspx?currency=usd&#E2;C;&#A9;=en
<http://mysite.com/exchange-rates.aspx?currency=usd<=en> ;
I want to be able to request http://mysite.com/exchange-rates/en/usd/
<http://mysite.com/exchange-rates/en/usd/>
instead of first ugly url ....

Why I want to do this?

- because regardless the technological evolution my links
will remain maintainable (in les than 5 years I moved from .htm to .asp
and now to .aspx ...)

- because, if I'll develop a module, called, let's say, ***news*** (some
aspx files grouped
in a single directory - c:\www\news), and my site have to sections
( http://mysite.com/first-dept <http://mysite.com/first-dept> and
http://mysite.com/second-dept <http://mysite.com/second-dept> ),
I want to be able to "mount" this module to both site sections;
of course there be a logic in the code which will present apropiate news
for each department ...
and both sites will have their own news corner :
( http://mysite.com/first-dept/news <http://mysite.com/first-dept/news>
and http://mysite.com/second-dept/news <http://mysite.com/second-dept/news>
)

If anyone know that this is possible with ASP.NET's httphandler,
please send me some url's or some proof-of-concept examples ...

Thanks,
Aurelian POPA

PS. I know that this is possible with ISAPI filters and/or extensions ...
but I hate C++ ...

| [aspnghttphandlers] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspnghttphandlers.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

jg&#E1;&#AF;RB;mvWgm &#E9;&#A2;`i&#D8;&#B1;9D�E;B;m&#E0;&#BC;&#AC;X(&#E0;&#BE; B;X&#CA;&#AC;�F;i&#DD;_ j$iNB;m&#E1;&#B3;&#AC;X(&#E1;&#AE; B;E;j!H@ p+r
Reply to this message...
 
    
Aurelian POPA
And another trouble is that It's ok for url's like /aaa/test.aspx
but it gives me a 404 Not found for aaa/test .... (req 1)
    -----Original Message-----
    From: Peixin Han [mailto:Click here to reveal e-mail address]
    Sent: Wednesday, August 01, 2001 11:22 PM
    To: aspnghttphandlers
    Subject: [aspnghttphandlers] RE: Request procesor ...

    Hi, Aurelian,
    There are several ways to do that. You can use
HttpContext.RewritePath or implement the httphandler by yourself.
    You can define Application_BeginRequest in your global.asax file,
and use HttpContext.RewritePath to transfer the request to another page. For
example, in order to resolve your question 3, you can
    <script runat=server>
    public void Application_BeginRequest() {
    String p = Request.FilePath;
    //Parser the URL, get en and usd
    &#E2;P&#A6;..
    //Generate a new URL passing en and usd as querystring
    p = &#E2;P C;/exchange-rates.aspx?currency=&#E2;P D; + usd + &#E2;P C;&language=&#E2;P D; + en;
    //Pass the new URL to Context.RewritePath. The execution will be
transfer to the new aspx page.
    Context.RewritePath(p);
    }
    </script>
    In order to call an asp page or html page, you can use
Context.Response.Redirect in Application_BeginRequest.
    You can also implement this using httphandler. Here is an example.
    public class abc : IHttpHandler
    {
    public virtual void ProcessRequest(HttpContext context)
    {
    if (page.aspx exist)
    context.Response.Redirect("http://localhost/page/page.aspx";);
    else &#E2;P&#A6;.
    }
    public virtual bool IsReusable
    {
    get { return true; }
    }
    }
    Thanks,
    -Peixin
    -----Original Message-----
    From: Aurelian POPA [mailto:Click here to reveal e-mail address]
    Sent: Wednesday, August 01, 2001 03:20
    To: aspnghttphandlers
    Subject: [aspnghttphandlers] Request procesor ...
    Importance: High
    I want to implememt the following:
    1. when a user request let's say <http://mysite.com/somefolder/page>
,
    my handler must search for a directory called page, and then for a
page called page.aspx,
    and then for a page called page.asp and finally for a page named
page.html or page.htm
    (maybe even a configurable feature for specifying order of seacrh is
welcomed)
    2. if my root of site is located at c:\inetpub\wwwroot, I want to be
able to dinamically
    (not with virtual folders)
    mount site nodes like <http://mysite.com/firstnode/page> to local
folder located
    upper in folder tree (for example page.aspx in
c:\www\packages\firstnode)

    In this way it will be possible to request
<http://mysite/firstnode/page> and
    this handler will "transfer" constrol to the
    script page.aspx in c:\www\packages\firstnode
    3. a way of passing URL folders as parameters to the aspx script ...

    for example let's assume that I have an exchange rates page ...
    something like:
    - <http://mysite.com/exchange-rates.aspx?currency=usd<=en> ;
    I want to be able to request
<http://mysite.com/exchange-rates/en/usd/>
    instead of first ugly url ....
    Why I want to do this?
    - because regardless the technological evolution my links
    will remain maintainable (in les than 5 years I moved from .htm to
.asp and now to .aspx ...)
    - because, if I'll develop a module, called, let's say, ***news***
(some aspx files grouped
    in a single directory - c:\www\news), and my site have to sections
    (<http://mysite.com/first-dept> and
<http://mysite.com/second-dept>),
    I want to be able to "mount" this module to both site sections;
    of course there be a logic in the code which will present apropiate
news
    for each department ...
    and both sites will have their own news corner :
    (<http://mysite.com/first-dept/news> and
<http://mysite.com/second-dept/news>)
    If anyone know that this is possible with ASP.NET's httphandler,
    please send me some url's or some proof-of-concept examples ...
    Thanks,
    Aurelian POPA
    PS. I know that this is possible with ISAPI filters and/or
extensions ...
    but I hate C++ ...
    | [aspnghttphandlers] member Click here to reveal e-mail address = YOUR ID
    | http://www.asplists.com/asplists/aspnghttphandlers.asp = JOIN/QUIT
    | http://www.asplists.com/search = SEARCH Archives
    jg&#E1;&#AF;RB;mvWgm &#E9;&#A2;`i&#D8;&#B1;9D�E;B;m&#E0;&#BC;&#AC;X(&#E0;&#BE; B;X&#CA;&#AC;�F;i&#DD;_ j$iNB;m&#E1;&#B3;&#AC;X(&#E1;&#AE; B;-j!H@ p+
Reply to this message...
 
 
System.Runtime.Remoting.Contexts.Context
System.Web.HttpContext
System.Web.IHttpHandler




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification