ASP.NET Deployment - Files to be Deployed

This article refers to ASP.NET v1.x version.  For updated version for ASP.NET 2.0, please check http://geekswithblogs.net/ranganh/archive/2007/07/31/114320.aspx

Many of us have this question of what are the files we need to publish when using FTP to move files to production server, for deploying an ASP.NET Web application.

The question obviously arises because when we use Visual Studio.NET to create a web application, there are many files created such AssemblyInfo.cs, Global.asax, Web.config, Proj file, codebehind files, resx files for each aspx page, etc.,

This article helps in understanding what are the files and why they are required for deployment.


1. ASPX files - These files are required as they hold the design as well as the controls declarations and these are the pages accessible by the users.

2. ASCX files - Usercontrols which form part of the pages.

3. BIN Folder - The BIN folder holds the key for an asp.net application. The DLL for the application lies within this folder and all the application logic you write in the codebehind files (.cs or .vb) are built into this DLL. The BIN folder has to be in the root of the directory and the DLL should be available within the BIN folder.

4. Web.config file - This is the configuration file for the application. Many settings such as Authentication, Session State, Authorization, Global Variables and other things can be set in this file. The advantage is that this file is an XML file and therefore doesnt require a compilation of the DLL after editing the file. It is advisable to store many configurable things like connection string, Database name, etc., in this file i.e. so that after deployment, changing these, doesnt require recompilation.

5. Other static files like CSS, JPG, GIF, XML, XSL Files also need to be published.

The following are the list of files NOT required to be published.

1. Codebehind files - .cs if c# and .vb if vb.net
2. RESX files
3. Proj file
4. Webinfo file
5. AssemblyInfo.cs or AssemblyInfo.vb

Cheers.

posted @ Monday, April 25, 2005 7:40 AM

Print

Comments on this entry:

# re: ASP.NET Deployment - Files to be Deployed

Left by matt at 7/23/2005 2:15 PM
Gravatar
Thank you - to the point, and just what I needed!

# re: ASP.NET Deployment - Files to be Deployed

Left by steve at 10/5/2005 12:15 PM
Gravatar
Doesn't Global.asax need to be deployed as well?

# re: ASP.NET Deployment - Files to be Deployed

Left by sion at 12/21/2005 3:03 PM
Gravatar
Yes Global.asax needs to be deployed as well. You also need the aspnet_client folder.

# re: ASP.NET Deployment - Files to be Deployed

Left by Sheetal at 4/28/2006 5:10 PM
Gravatar
Do you need .pdb files to be deployed on production?

# re: ASP.NET Deployment - Files to be Deployed

Left by Nicolás T at 5/19/2006 11:12 AM
Gravatar
You should, in fact, copy the .pdb file to production IF/WHEN you have
exception handlers that make user of the stack trace (e.g., to log the exact
line of code that choked, thereby throwing the exception). If you are doing
this (I can't imagine why anyone wouldn't want this information in a
produciton system), then you will need to copy BOTH the .pdb and .dll file
whenever you recompile - as the .pdb version is logically tied to the .dll
version.

This is an answer from http://www.codecomments.com/archive289-2005-2-407432.html . I Hope it hepls.

# re: ASP.NET Deployment - Files to be Deployed

Left by Ravi at 6/5/2006 6:01 AM
Gravatar
Thanks for good knoledge, infact i was little confused for DLL and PDB files, but with above descussions its clear

# re: ASP.NET Deployment - Files to be Deployed

Left by sourabh at 11/13/2006 11:30 AM
Gravatar
most important page for any asp.net developer :)

# re: ASP.NET Deployment - Files to be Deployed

Left by Shawn at 11/14/2006 12:50 PM
Gravatar
Exactly what I was looking for

# re: ASP.NET Deployment - Files to be Deployed

Left by Mahesh at 2/5/2007 12:53 PM
Gravatar
Thank You. Just What i needed

# re: ASP.NET Deployment - Files to be Deployed

Left by Sree at 1/2/2008 4:12 AM
Gravatar
I have made some changes to a class project, which is part of a web application solution. Please let me know the best way to implement these changes in the producion server. The project that has the aspx pages has its dll in the bin and 'references' all the other projects(including the class, I made changes to ).

Should I then zip this web project and ask them to replace the project under wwwroot with the updated one? Will the changes to the class be reflected?

I may, however, send the client a copy of the class project. Any information is greatly appreciated.

# re: ASP.NET Deployment - Files to be Deployed

Left by Karthik at 1/22/2008 1:47 AM
Gravatar
Hi,
This is regarding the changed file getting moved to production.
I have made design and code change to a file which resulted in the changes of .aspx and .cs file. This is a sub-project which has its references to the mainproject/bin folder as well.
I want to move these two files to production.
I have steps in mind, please correct me if am wrong.
1. place those two files in the corresponding folder in the production server.
2. open the solution file, rebuild the the sub-project which undergone the change.
3. copy the sub-project dll and place in the mainproject/bin folder.
4. re-build the mainproject.
Is these above process correct or is there any other way of handling...please suggest.
Thanks,
Karthik

# re: ASP.NET Deployment - Files to be Deployed

Left by yasaswini at 3/18/2008 1:30 AM
Gravatar
Can u give some article about 3 tier architechture

# re: ASP.NET Deployment - Files to be Deployed

Left by ANWER at 3/18/2008 5:48 PM
Gravatar
thanks the simply for making understand these all in simple manner,really usefull information.

# re: ASP.NET Deployment - Files to be Deployed

Left by mario oyunları at 9/21/2009 10:45 AM
Gravatar
thereby throwing the exception). If you are doing
this (I can't imagine why anyone wouldn't want this information in a
produciton system), then you will need to copy BOTH the .pdb and .dll file

# re: ASP.NET Deployment - Files to be Deployed

Left by mario oyunları at 9/21/2009 10:46 AM
Gravatar
infact i was little confused for DLL and PDB files, but with above descussions its clear

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345