locked
does iis compile code behind RRS feed

  • Question

  • User-1062164168 posted

    they are things on deployment i have to reconsider,

    1) when created abc01.aspx page with code file (code-behind) , how does iis compile the code-behind , is it together with the aspx webform while loaded with declaring <@page .... codefile="abc01.aspx.cs">

     2) if we created a folder called FolderCodefile, will the iis compile in that folder ? if they are compile, when are they compile? server starts or IIS start / refresh ?

     3) if we allocated classes inside App_Code, when do these classes get compiled? server starts / iis start ?

    4) if we created dll and put in bin, does iis compile it again or it can be use immediately?

    Tuesday, November 25, 2008 10:00 PM

Answers

  • User27657075 posted


    1) when created abc01.aspx page with code file (code-behind) , how does iis compile the code-behind , is it together with the aspx webform while loaded with declaring <@page .... codefile="abc01.aspx.cs">

    If you created a "web project" you compile everything yourself by using "build" in the toolbar. All the .cs files corrosponding to the aspx are compiled in one dll. You just depoly that one .dll file and your aspx files.
    If you created a "web site" you deploy/copy both aspx/cs files to the production server. .cs classes get compiled the first time the applicaiton is run (first page requested from the application)
     
    2) if we created a folder called FolderCodefile, will the iis compile in that folder ? if they are compile, when are they compile? server starts or IIS start / refresh ?

    .aspx file with code behind can be put in any nested folders and will be compiled. .cs class files can only be in special App_Code folder (can be in nested folder inside App_Code)
      
    3) if we allocated classes inside App_Code, when do these classes get compiled? server starts / iis start ?

    "Web Project" - You compile by "build" in the toolbar.
    "Web Site" - Compiled the first time the applicaiton is run (first page requested from the application)
     
    4) if we created dll and put in bin, does iis compile it again or it can be use immediately?

    Can be used immediately

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 26, 2008 12:35 AM