473,394 Members | 1,737 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,394 software developers and data experts.

PageParser.GetCompiledPageInstance


I am working with a custom handler factory that serves aspx pages
based on url.

When this is called, it compiles the page based on the url that the
application pool uses to serve up the page. Is there a way to "re-
compile" or change the underlying .aspx page displayed when calling
this method for a specified url?

So is the only way to change the layout to restart the webapp or touch
the web.config which are not viable options.

This is a pretty tricky problem, and there may not be a solution, but
any insight into the process would be cool.

My current understanding is this

1st Request
Request (To Url X) --Handler Factory --GetCompiledPageInstance --
... --page is compiled --page events --page to client
2nd Request (To Url X) --Handler Factory --GetCompiledPageInstance
--... --page events
Jun 27 '08 #1
2 3451
not sure what you are trying to do.

GetCompiledPageInstance uses the physical path to the aspx file to determine
if the page needs to be compiled and loaded into memory, or if its already
loaded. it has a file dependency, so that a file change will trigger a
recompile. once a page is loaded in memory it can be unloaded without a
appdomain recycle. if you change the page code, then the recompile is
triggered.

it sounds like you may be wanting to do url remapping which has nothing to
do with GetCompiledPageInstance.

-- bruce (sqlwork.com)
"IanL" wrote:
>
I am working with a custom handler factory that serves aspx pages
based on url.

When this is called, it compiles the page based on the url that the
application pool uses to serve up the page. Is there a way to "re-
compile" or change the underlying .aspx page displayed when calling
this method for a specified url?

So is the only way to change the layout to restart the webapp or touch
the web.config which are not viable options.

This is a pretty tricky problem, and there may not be a solution, but
any insight into the process would be cool.

My current understanding is this

1st Request
Request (To Url X) --Handler Factory --GetCompiledPageInstance --
... --page is compiled --page events --page to client

2nd Request (To Url X) --Handler Factory --GetCompiledPageInstance
--... --page events
Jun 27 '08 #2
The implementation I am working on is kind of a hack, but it's the way
it is. It is being used for rewriting, but the user has the ability to
switch which .aspx pages are used for a url. I have solution to
rewrite this but... I was wondering if there is a band-aid besides,
recycling, and possibly touching the .aspx file?
Jun 27 '08 #3

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

Similar topics

0
by: Ralfs | last post by:
Hi, does anyone know how to use this method: GetCompiledPageInstance(string, string, HttpContext) Regardless what I try I get exception that some "path" is Null. I guess that this path is...
4
by: Joe Spooner | last post by:
Hello, This may seem very obvious to someone else, but I'm at a loss for an answer to this problem. I have written an HttpHandler that opens up an html file and returns a string. This works...
4
by: Hari Koduru | last post by:
Hi All, I am getting the following exception in an ASP.NET application. Exception Details: System.InvalidOperationException: Application is restarting. I have been to the following Support...
1
by: Bartosz Krzywicki | last post by:
I have the problem with Session object witch is null, when I implement IHttpHandlerFactory. Implementing IRequiresSessionState interface doesn't help. My code is like this: class MyController :...
2
by: Misha Bergal | last post by:
I want to make my own PageParser, to implement some functionality currently missing from standard one, i.e.: * Code blocks which are marked with % in first line % foreach( int c in ... ) % {...
1
by: Patrick | last post by:
Hi you all, I'm facing a litle problem with a custom httpHandler for ASP.Net. The application will be precompiled for deployment, so I won't have any .aspx files which contain code or anything...
3
by: Martin | last post by:
Hi, I have a number of documents stored on my web server and these documents should not be servered to anybody unless the user is both authenticated and authorized. This authentication and...
5
by: John H Clark | last post by:
I am building an IHttpHandlerFactory to process all requests to folders in my site. When an attempt to access internal folders is detected the request is rerouted to an error page. All other...
0
by: Paresh | last post by:
Hi All, I am using ASP.net 1.1. I have used HttpHandler for UrlRewriting for this I have used GetCompliedPageInstance method. Now because of this my caching logic is not working. ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.