Deploying Pre-Compiled Web Applications

The article explains manual precompilation process of the whole application using the PreCompilation tool installed with ASP.NET 2.0.

The steps invovled are :-

1. Type "cmd" from Run Prompt to open the Command Prompt

2. Navigate to %windir%\Microsoft.NET\Framework\v2.0.50727

3. Type aspnet_compiler -v /"Website Name" -p "Physical Path to your site" "Physical Path to Deployment Location"

4. e.g aspnet_compiler -v /Website1 -p "C:\Projects\Website1" "C:\PreCompiled Website1"

5. There are multiple switches which you can try in the above command. You can verify all the options by typing aspnet_compiler -? from %windir%\Microsoft.NET\Framework\v2.0.50727\

Once you run the above command you would notice that in the Deployed location, all the files including ASPX, ASCX are precompiled and dont contain any markup. If you try opening an ASPX Page, you will only find the text "This is a marker file generated by the precompilation tool, and should not be deleted!" and it does not contain any HTML markup. This way the site is totally pre-compiled and can also prevent any one from viewing the source code. You need to specify the "-u" keyword in the above command before the target directory specification, to make this site updatable.


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: