views:

182

answers:

3

I have an interesting scenario: - Site has 209,000+ pages. - Evertime a user submits a new article/item a new page is generated and if it has a refernece to one of the existing pages then that page is also re-generated and saved. - A windows service is looking after the generation of pages which creates a page(file) in the site directory. - The purpose of pre-generated pages was to save requesting data from the database as 75% times data will never be updated and having a pre-generated file on the FS saves processing and memory.

It has been working very well but we are concerned now...

The problem is the disk space is running out and if we restart the server it takes a while for site to compile and run and as volume increases we think this will cause us serious problems.

Is there a way to have pre-compiled site and we can still generate pages? (the generated pages all inherit from one class and they have custom controls)

Any suggestions?

A: 

Using pages to store the content will always create a problem when the number of pages is big. Since all the pages are hosted in the web server, in a near future you could have a problem. Maybe you could consider to use a WCM (Web Content Management) application instead of automatic page generation.

Answering you question, I believe you can inherit from one class (from pre-compiled pre-generated pages), but I think you will NOT have the new page pre-compiled. Just to highlight this is a guess, because I never did something like that.

Contrucci
That is an interesting thought, i will experiement. I hope it works as the new page is only refering to an already compiled code.
Usman Akram
A: 

Threre are tools for compiling aspx pages http://msdn.microsoft.com/en-us/library/ms227976.aspx

Alex Ilyin
A: 

The real problem was "Project type" which was "Web Site" Project. The web site project has dynamic compilation enabled using codedom, thats why it has App_code folder also which does not work in "Web Application" type Projects. All the generated Pages where getting compiled whenever someone visited them. Since this issue I have converted to Web Application and have good results.

Rumours are in VS2008 Microsoft dropped Web Application project type but later added it.

Usman Akram