Use standard ASPX page as a HTTP handler

M

Michael

Hi

I would like to use an existing ASPX page as a HTTP handler so that I
can do something like this....

<system.web>
<httpHandlers>
<add verb="*" path="Global.aspx" type="MyApp.Web.scripts.Global,
MyApp.web/>
</httpHandlers>
</system.web>

Where Global.aspx is a standard 'Web Form' created in the vs.net
designer

I have tried this and it does execute the code in the code behind but
it doesn't initialise or render any of the controls on the aspx page
(even runat=server). Clearly I am missing something.

It seems to me that this would be an elegant way to create a 'Global'
Aspx page that could be referenced from multiple paths within a
virtual directory without duplication or the use of parent paths. I
have tried other approaches such as using the
Application_BeginRequest to do a RewritePath but ran into a lot of
problems e.g. use of query string data + inabilty to look at User
Authentication within Application_BeginRequest.

Any help appreciated

Michael Dausmann
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top