473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

use httphandler to dynamically output system.web.ui.page via Master Page

Hi - I'm working on a front-controller style application in ASP.NET
2.0. I have mapped all HTTP requests to ASPNET_ISAPI, and use an
HttpModule to do a database lookup on the search-engine-friendly URLs
that my app uses, in order to select the correct output for the
context.

Mapping the HTTP request to a physical ASPX page seems fairly
straightforward with HttpContext.RewritePath. However, I don't really
want any physical ASPX pages in my app. All my content lives in the
database, so I'd rather create a System.Web.UI.Page object in the
HttpHandler, set it to use a MasterPage for templating the output, and
add WebControls and Content to it as required by the request URL
context.

Anyway, I created a class that extends System.Web.UI.Page and set this
as my HttpHandler in web.config. Lo and behold, I can get it it to
handle requests. HOWEVER - I can't get it to work with MasterPages when
I try to set it via the Page.MasterPageFile property. The
"MasterPage.CreateMaster()" fails in its call to
"VirtualPathProvider.CombineVirtualPathsInternal() " because apparently
basePath is null.

Has anybody else solved this?

Dec 7 '05 #1
0 1136

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Earl Teigrob | last post by:
My company sells software and wants to provide downloadable product. Some of these downloads will be full CD's of over 550M I had everything working fine using Response.filewrite() but when we...
6
by: Kentamanos | last post by:
Please don't ask me why I'm doing this (trust me, it makes sense in my system), but I'd like to basically redirect requests for a certain extension (thus a handler) to an ASPX page behind the scenes....
3
by: Jed | last post by:
I have written an HttpHandler which I invoke through an ashx page. The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page. Everything...
1
by: Dale Ragan via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Dale Ragan I am running into a problem with an HttpHandler that I have builtto show a progress image on the page getting...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
6
by: Steve | last post by:
Hi there, I'm trying to create a new website that will have a common aspx file serve as a template. I want all other pages to use this file and 'inject' their own content i.e. user controls,...
23
by: LvBohemian | last post by:
I am playing around with creating some menus dynamically, and they create fine and show up ok when I want them to; but when I select a menu NavigateUrl at run time, the applicable url shows up...
3
by: Joe Reiss | last post by:
Hi All, Using vs 2005, c#, ms sql 2005 asp.net web site. Using httphandler to generate dynamic image from sql server database. Going according to instructions from msn: I'm using is...
6
by: Mike | last post by:
Hi, I have a problem of page redirection. Basically, the user has to connect to the local web server, but some pages need to be served by a remote server, because it contains some confidential...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.