Sunday, May 15, 2011

Publish your web application using visual studio .net

Publishing the web application provides a measure of protection for your intellectual property and makes it more difficult for others to access the source code of your site. When you published your web application, then every .cs file convert into dll and .aspx file that are using these files automatically got reference to these dll. You can publish your web application to a local or shared folder, to an FTP site, or to a Web site that you access by using a URL.
To publish a Web application

  1. In the Build menu, click Publish ProjectName.



    OR
    Right Click on web application in Solution explorer.
  2. Choose "Publish website" Option.
  3. Click the ellipsis button () to browse to the location that you want to publish the Web application  to.


  4. Select the Replace matching files with local copies check box or the Delete all existing files prior to publish check box.
  5. Select how you want to copy the Web application project files to the new location by using Only files needed to run this application, All project files, or All files in the source project folder.
    You can include files from the App_Data folder by selecting the corresponding check box.
  6. Click OK to publish the Web application project.
    In the task bar, Publish succeeded is displayed when publishing has finished.

3 comments:

  1. Thanks Amit
    This is a valuable Information for me...

    ReplyDelete
  2. I always like to help people but if any time I got myself to unable to help some 0ne, I become sad..

    ReplyDelete
  3. Again Thanks Amit!
    I got the solution.
    After Publishing web site my Class file got disappear.
    When i have created My Class file it become automatically placed into App_Code folder.
    And After Publishing web site there is no any file with the name same as my class file name.
    After Publishing web site i got a bin folder,
    and within this folder i got three files.
    1) App_Code.compiled
    2) App_Code.dll
    3) App_Web_uxvipskw.dll
    or App_Web_default.aspx.cdcab7d2.dll (if i checked the check box "Use Fixed Naming and Single page assemblies" during publish web site)
    My Class file merge with the App_code.dll
    Yes it is encrypted.
    And my Web site runs successfully.

    ReplyDelete