ASP.NET

  • bannerpad
  • Novice
  • Novice
  • No Avatar
  • Joined: Mar 16, 2004
  • Posts: 18
  • Status: Offline

Post June 2nd, 2004, 5:01 pm

Does anyone know how to make it so ASP.NET files (.aspx) get compiled without having someone visit it 1st.

I wish to compile all the pages so even when someone visits it for the 1st time, it will still be fast.

Right now, the 1st time someone visits a .aspx page, it has to compile and can take a while.

Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 2nd, 2004, 5:01 pm

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post June 2nd, 2004, 9:09 pm

I think you could probably achieve it by caching the aspx pages in IIS on the server, however I'm not at work, and can't remember exactly how to adjust the settings at the moment. Perhaps someone can offer the how-to in the meantime.

Actually a very quick Google search for : cache aspx

lead me to this page: http://aspnet.4guysfromrolla.com/articles/022802-1.aspx

That should be what you are after.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Joined: Apr 28, 2004
  • Posts: 1099
  • Status: Offline

Post June 3rd, 2004, 7:14 am

That said... (good reference ATNO, by the way!)

You don't compile ASP pages. The are run-time compiled. If you want to compile your code, you would be doing a thing called creating COM objects.

.c
  • LAbrego
  • brego from LA
  • Web Master
  • User avatar
  • Joined: May 25, 2004
  • Posts: 2850
  • Status: Offline

Post June 3rd, 2004, 8:36 am

Caching could be great if your pages are mostly static, if they change a lot it'll be no difference in performance. One thing I always do with aspx files when I modify them is simply open it myself for the first time, this way I not only sure it works fine but I save my user from waiting.

But if you really want to do that check this article

http://www.codeproject.com/aspnet/PreCompileAspx.asp
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Joined: Apr 28, 2004
  • Posts: 1099
  • Status: Offline

Post June 3rd, 2004, 9:06 am

They call this pre-compiling, but it looks more like caching output to me. .NET sort of blurs the lines between compile-time and run-time execution, even more than Java does, but if you can open the files that the end user will be accessing and view the source code with a text editor, then the application isn't really being compiled.

Compliation involves parsing the source and translating that into machine code of some sort. Different languages and compilers have different definitions of this and some are more portable than others without much effort (Java vs C++, for example...), but the end result is a file that when viewed as text looks like gobbledygook...

Why do I really care? I don't.

.c
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post June 3rd, 2004, 9:38 am

From what I can remember, the difference between compiled and interpreted(run-time compiled) is this:

A compiled language will be converted from source code into machine code and then the machine code will be executed at run time

An interpreted language is compiled and then executed, <b>one line at a time</b>, at run time. It needs to be interpreted every time the application is executed.

Thats the text-book definition. TBH I can't see how you can blur the edges of that, it seems pretty clear cut. As Carnix said, if you can read the file, its interpreted, otherwise it's compiled and the file will look like squares mostly :)

If this really was compilation then you would notice an improvement in performance even if the output changed every time. You would also have to manually recompile every time you changed the source code

I only care because I have to learn all this theory for an exam in two weeks lol
CSS website design tutorials
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Joined: Apr 28, 2004
  • Posts: 1099
  • Status: Offline

Post June 3rd, 2004, 9:44 am

rtm223 wrote:
From what I can remember, the difference between compiled and interpreted(run-time compiled)


heh, I was brain-farting on the word Interpreted.. heh. I KNEW there was a technical term for it that I couldn't think of... =]

.c
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Mar 24, 2004
  • Posts: 1855
  • Loc: Uk
  • Status: Offline

Post June 3rd, 2004, 10:43 am

lol, as I said I've gotta learn all this theory, although <b>none</b> of it is actually any use in real terms - it's just another A level and I should get an A in it - it's just for my CV.

TBH I wasn't sure if run-time compiled was a different technical term for the same thing, like "interpreted language"="scripting language". My brother (programs C/C++) told me off last week for calling PHP a programming language :lol:
CSS website design tutorials
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Joined: Apr 28, 2004
  • Posts: 1099
  • Status: Offline

Post June 3rd, 2004, 11:06 am

It is a programming language. A programming language is nothing more than a structured system to make a computer execute computations in a specific way. Some languages are more robust in what sorts of things it can make the computer do than others, C++ is very robust since it can access any aspect of a system, JavaScript isn't, since it's isolated to the stuff inside of a web browser's window object, but it's still a programming language.

Purists are annoying like that. It's not all about one thing or another being best. You use the tools that best fit a given job. Not everything needs to be programmed in C, and sometimes using a compiled program is actually less affective than simply writting a script.

Imagine having to write custom admin scripts for Linux in C every time, instead of using Perl. Ugh. What a nightmare that would be... Both initial writting and updates... forgetaboutit.

.c

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 110 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.