Search This Blog

Saturday, March 9, 2013

How can publish asp.net website in vs 2008


Publish a Web site project:


1.       On the Build menu, click Publish Web Site.
2.       In the Publish Web Site dialog box.
3.       We have 4 check boxes in dialog window.


a). Allow this precompiled site to be updatable.
Classic precompilation: *.aspx pages are not precompiled, but .cs classes and code-behind files are precompiled.
To be able to change.aspx files after publishing the Web site (without recompiling them) When this check box is selected, it specifies that the content of .aspx pages are not compiled into an assembly - the markup is left as is, allowing you to change HTML and client-side functionality after precompiling the Web site. Alternatively you can use
-u option with the aspnet_compiler.exe command line tool to achieve same result.

b). Use fixed naming and single page assemblies.
If you want to be able to update individual pages by recompiling them, select Use fixed naming and single page assemblies.
Fixed named assemblies provide flexiblity in page level updates. Since each page will have its own named assembly (instead of a random name) it is easy to update the application by just updating the required assembly.
 batch compilation is turned off for precompilation. (Themes and skin files, along with other folders that do not contain pages or user controls, will continue to be compiled to a single assembly.)
Disadvantage is the large number of assemblies (difficult to maintain) and also slight performance hit would be there.

c). Emit debug information.
We want to be able to debug in the published Web site, select Emit debug information.

d). Enable strong naming on precompiled assemblies.
if you want to allow the assemblies to be called by partially trusted code, select Mark assemblies with AllowPartiallyTrustedCallerAttribute (APTCA).

No comments :