473,626 Members | 3,198 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

use httphandler to dynamically output system.web.ui.p age 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.Rew ritePath. 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.P age 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.P age 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.MasterPage File property. The
"MasterPage.Cre ateMaster()" fails in its call to
"VirtualPathPro vider.CombineVi rtualPathsInter nal()" because apparently
basePath is null.

Has anybody else solved this?

Dec 7 '05 #1
0 1155

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

Similar topics

5
2857
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 tested it with large files, it blew up. (crashed the server, well documented problem) I can download a file just fine if I just point to the download file and let IIS generate the download dialog (but with no security, of course)
6
7792
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. I've created a handler and set it up to handle the extension in question. In my ProcessRequest, I'd like to basically figure out which ASPX page to "forward" the request to. I've tried all sorts of methods (Server.Transfer and Server.Execute for...
3
7956
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 up to the redirect works fine, but I can't get the redirect to work. If I do a ... context.Response.Write("Hello World"); .... the HttpHandler works great and the browser loads the text fine, but if I change it to ...
1
2520
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 processed. I amusing Response.Flush and as you know you cannot have aResponse.Redirect after you have flushed the buffered content tothe client. You get the cannot modify cookies after the headerhas been sent exception. I know of some ways to correct...
3
3075
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 displayed. Can anybody know this issue and help me to resolve this. In past i received the response saying that i should download the image first and then parse the actual response and modify the src attribute of the
6
5719
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, static html etc. The thing is that I don't actually want these other 'pages' to exist on disk (since I don't want to have to maintain multiple aspx pages - just the content). I basically want an XML file that defines the content 'page' path,...
23
12530
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 as anticipated in the content place holder but the menu disappears... the menu is part of the master page and is not in the
3
3449
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 Resuable and Process Request procedures. ProcessRequest has logging code and calls System.Diagnostics.Debugger.launch() - never get gets called.
6
3340
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 data that cannot be moved locally (everything occurs in the company Intranet, however). Since the ASP.NET application uses extensive Javascript, we cannot make it work because of the "cross-site" (same origin policy) of Javascript. Therefore, we...
0
8265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.