简体   繁体   English

ASP.Net 3.5网站项目VS Web应用程序项目

[英]ASP.Net 3.5 website project VS web application project

I have an interesting scenario: - Site has 209,000+ pages. 我有一个有趣的场景:-网站有209,000+页。 - 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. -Windows服务正在照顾页面的生成,该页面在站点目录中创建页面(文件)。 - 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. -预先生成页面的目的是保存从数据库中请求的数据,因为75%的数据将永远不会更新,并且在FS上拥有预先生成的文件可以节省处理和内存。

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? 有什么建议么?

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. 由于所有页面都托管在Web服务器中,因此在不久的将来您可能会遇到问题。 Maybe you could consider to use a WCM (Web Content Management) application instead of automatic page generation. 也许您可以考虑使用WCM(Web内容管理)应用程序代替自动生成页面。

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. 仅强调这一点是一种猜测,因为我从未做过这样的事情。

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. 该网站项目使用codedom启用了动态编译,这就是为什么它具有App_code文件夹的原因,该文件夹在“ Web应用程序”类型的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. 自从此问题以来,我已转换为Web应用程序并取得了良好的效果。

Rumours are in VS2008 Microsoft dropped Web Application project type but later added it. 谣言是在VS2008中,Microsoft放弃了Web Application项目类型,但后来又添加了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ASP.net:网站或Web应用程序项目 - ASP.net: Website or web application project ASP.NET网站“发布”与Web部署项目 - ASP.NET website 'Publish' vs Web Deployment Project ASP.NET 3.5 Web应用程序项目需要花费很长时间才能进行初始加载 - ASP.NET 3.5 Web Application Project takes excessively long time to initially load 在 asp .net 3.5 中创建新项目时出错? 这是 Web 应用程序 - Error in creating new project in asp .net 3.5 ? This is Web application ASP.NET Web应用程序项目的预编译 - Precompilation of ASP.NET Web Application Project 组织 ASP.NET Web 应用程序项目 - Organizing ASP.NET Web Application Project Azure DevOps Continuous Integration with asp.net web forms website project instead of web application - Azure DevOps Continuous Integration with asp.net web forms website project instead of web application 如何部署一个asp.net 3.5项目? - how to deploy an asp.net 3.5 project? 有没有办法在VS 2008中将现有项目类型从ASP.NET Web应用程序更改为ASP.NET MVC应用程序? - Is there a way to change existing project type from ASP.NET Web Application to ASP.NET MVC Application in VS 2008? 将ASP.NET MVC应用程序发布到Web主机 - 在VS项目结构而不是应用程序中部署文件 - Publishing ASP.NET MVC application to a web host - deploys files in the VS project structure instead of the application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM