.compiled files after using aspnet_merge

  • Thread starter Thread starter bb
  • Start date Start date
B

bb

after running the web deployment project on my aspnet app, i end up
with rather a lot of metadata files in the bin folder ... e.g.


addeditmodule.ascx.7b81ad39.compiled
addeditmodulecategory.ascx.7b81ad39.compiled

etc...

if they are deleted from the bin folder the app fails to work correctly
ont he target server.


are these files really required?
is there a way of 'compiling them in/out somewhere'?
 
Seems to me that you know your answer to that question ... as you say, when
youdelete them the app doesn't work, so yes, they are required.

You might wanna try the web deploymnet project:
http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/default.aspx

it offers a number of different options for how your site should be
packaged. Install the package, open up VS.NET 2005 and your
project/solution, and under the "Build" menu you should see a new option.
It doesn't work in Developer Express :(

Karl
 
i can only imagine you replied without reading my post.

i already have the web deployment project installed! im doing one! ..

what i am askin .. is that it is generating quite a few files named
"classname.randomstring.compiled" into the bin folder and im
interested in why, and if possible how to reduce them.

i have tried piping the output of the web deployment project into a web
setup project, ran the msi on a server - and i notice that there are
hardly any .compiled files created in the bin folder (and the app still
works). i am therefore assuming there must be some way of controlling
why and how these files are created.

does anyone who has knowledge in this area have anything to enlighten
me?
 
I'm sorry, my early morning posts aren't always stellar.

Lemme try to make it up, if you check the "Allow this precompield site to be
updatable" under the compilation, you'll end up with a model more like 2003,
where you'll have ur aspx pages but no .compiled. I'm not sure if that
helps at all.
 
better!

no i want the precompilation aspect (as i wasnt that keen on having the
app_code directory have to be shipped to the server as source!)

i just want to have an understanding (from someone who knows these
things) about exactly what those .compiled files are about, and why
different amounts of them may be generated from seemingly the same web
project.

thanks for the reply though!
 
when you check off that checkbox, only aspx files aren't pre-compiled (I
believe), all other .cs files, including those in the app_folder ARE.

But the .compiled files exist for an important reason. When you pre-compile
everything, there's no longer any pages. When a request goes into the
HttpPageHandler (the handler that serves all request for aspx file), it
would try to load the file, get an FileNotFoudnException and convert that to
a 404. Rather than that, when the app starts, it loads all .compiled files
into memory which contains all necessary information to server a request
(what other files it's dependent on and where the actual class is
contained). This essentially let's the PageHandler serve requests for pages
that aren't physically there.

As for different amounts...one is generated for each aspx and ascx. I have
seen older versions stick around, which might be what you are seeing.

Karl
 

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

Back
Top