开发者

asp.net: updated pages compilation

I need to ensure that when some individual pages are updated/modified, the time required to load the other pages to the Web site remains unaffected.

A. Create the application开发者_运维技巧 as a Web site project. Copy the entire application to the deployment server. Copy only the updated files to the deployment server when a page is updated.

B. Create the application as a Web site project. Pre-compile the application by using the update able option. Copy only the updated files to the deployment server when a page is updated.

is Pre-compile option available for web site or its available for web app?


I can simplify this question by some ifs that contains your answer.

If you update just the ASPX files and rarely you change the code files : then

  1. Use Website and publish it using

    • Allow this precompiled site to be updatable
      • Using this option you can change ASPX files
    • Use fixed naming and single page assemblies
      • Using this option you can change code files, and replace them with their friendly name
  2. Update required published dlls and ASPX files when ever you need.

    • Note: any changes to bin folder contents may cause application restart and that means all sessions will be lost, so in this case you must consider using other session state modes like SQLServer and StateServer and once you do you need to annotate all your session classes with Serializable attribute

If you will update just the ASPX files : then

  1. Use Website and publish it using
    • Allow this precompiled site to be updatable
      • Using this option you can change ASPX files

Else if you just need to update the ASPX HTML content : then

  1. You might reconsider your application scenario
    • because you need to use data-base to rectify the update problem as any body else do

And finally if you will update web-site code-files very rarely or your changes are at application level rather than page level : then

  1. Use web-application build or publish it if you like.
    • Using this option you still have the ability to change the ASPX files
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜