I have figured out a solution to this problem, however it takes a bit of doing:
1. Run aspnet_compiler, then aspnet_merge normally and then just
ignore/delete the .compiled files.
2. Create your own replacement for the .compiled files (perhaps one large or
several smaller xml files). All that matters is that you have a way to map
from a virtual path to an Assembly and Type.
3. In your web.config, replace the PageHandlerFactory for .aspx with your
own handler factory.
4. In your handler factory look at the mapping you made in step 2. Use
reflection to load the Assembly and create an instance of your Page
Problem solved! Now instead of 2 .compiled files for EVERY web page, I get
to decide on the format for the mapping between virtual path and
Assembly/Type that will serve the page.
One nifty side benefit of this is that I can now store my assemblies
anywhere I want (not just the \bin dir!), since I'm loading them myself using
reflection.
Some other notes for people going through this:
- You don't need to put empty web pages all over, just uncheck "verify that
files exists" in the IIS mapping
- It seems that pre-compiled sites don't allow a mixture of regular and
compiled pages. One can imagine creating a solution for this with the above
technique.
I was mildly disappointed that I couldn't organize the .compiled files "out
of the box", but I'm very happy that ASP.NET is flexible enough to let me
code it up myself.
Brian.
"Brian Pearson" wrote:
Don't get me wrong, I appreciate your attempt to help me, but a cut and paste
of a google search is not useful to me. I did the same google search before
my original post and read all of those links. If there is information that
addresses my question within those links, please let me know.
Does anyone know if it is possible to use aspnet_compiler and/or
aspnet_merge without one .compiled file for each web page?
Failing that, is there anything I can do to clean up or better organize the
many .compiled files?
And finally, what does the -r flag on aspnet_merge do? I don't understand
what this is telling me:
"Remove the .compiled files for main code assembly. This option should not
be used if your application contains any explicit type references to the main
code assembly."
"Venkat_KL" wrote:
Hi Dear Brian Pearson,
Look into these links
Merging ASP.NET 2.0 without aspnet_merge
========================================
http://geekswithblogs.net/rwandering.../20/57585.aspx
ASPNET_MERGE and Web Deployment Projects Arrive!
=================================================
http://petesbloggerama.blogspot.com/...d-web-deployme
nt.html
aspnet_merge - a swiss army knife for ASP.NET 2.0
=================================================
http://www.dotnetslackers.com/ASP_NE...e_a_swiss_army
_knife_for_ASP_NET_2_0.aspx
aspnet_merge - a swiss army knife for ASP.NET 2.0
=================================================
http://www.dotnetnuke.com/Community/...ID/195/Default.
aspx
Visual Studio 2005 Web Deployment Projects (Beta Preview)
================================================== =======
http://msdn.microsoft.com/asp.net/re.../wdp/default.a
spx
2 .doc Files
============
http://go.microsoft.com/fwlink/?LinkId=55639
http://download.microsoft.com/downlo...-407b-8c9f-c2d
f5445b041/Using%20web_deployment_projects_final.doc
Web Deployment Projects are here
================================
http://blogs.msdn.com/bgold/archive/...09/491062.aspx
ASPNET_MERGE and Web Deployment Projects Arrive!
================================================
http://www.eggheadcafe.com/PrintSear...sp?LINKID=1033
regards,
Bye,
venkat_KL
For Anything and Everything, Please Let Me Know
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com