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.

Print | posted on Monday, April 25, 2005 7:40 AM

Comments on this post

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

Requesting Gravatar...
Thank you - to the point, and just what I needed!
Left by matt on Jul 23, 2005 2:15 PM

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

Requesting Gravatar...
Doesn't Global.asax need to be deployed as well?
Left by steve on Oct 05, 2005 12:15 PM

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

Requesting Gravatar...
Yes Global.asax needs to be deployed as well. You also need the aspnet_client folder.
Left by sion on Dec 21, 2005 3:03 PM

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

Requesting Gravatar...
Do you need .pdb files to be deployed on production?
Left by Sheetal on Apr 28, 2006 5:10 PM

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

Requesting 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.
Left by Nicolás T on May 19, 2006 11:12 AM

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

Requesting Gravatar...
Thanks for good knoledge, infact i was little confused for DLL and PDB files, but with above descussions its clear
Left by Ravi on Jun 05, 2006 6:01 AM

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

Requesting Gravatar...
most important page for any asp.net developer :)
Left by sourabh on Nov 13, 2006 11:30 AM

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

Requesting Gravatar...
Exactly what I was looking for
Left by Shawn on Nov 14, 2006 12:50 PM

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

Requesting Gravatar...
Thank You. Just What i needed
Left by Mahesh on Feb 05, 2007 12:53 PM

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

Requesting 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.
Left by Sree on Jan 02, 2008 4:12 AM

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

Requesting 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
Left by Karthik on Jan 22, 2008 1:47 AM

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

Requesting Gravatar...
Can u give some article about 3 tier architechture
Left by yasaswini on Mar 18, 2008 1:30 AM

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

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

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

Requesting 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
Left by mario oyunları on Sep 21, 2009 10:45 AM

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

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

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

Requesting Gravatar...
Hi,
This poind is very useful
Left by natarajan on Nov 30, 2009 6:05 PM

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

Requesting Gravatar...
Hi
thanks admin.
Left by mario oyunları on Jan 04, 2010 3:07 AM

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

Requesting Gravatar...
A wedding is a joyous celebration a time when everyone is in high spirits, especially the couple, who have decided to be bonded together in a happy union for the rest of their lives now. The groom must be anticipating the wedding day with great eagerness, and the bride well, words would be quite a lame means of
Left by article editorial on May 08, 2010 6:50 PM

# update

Requesting Gravatar...
you should upload the Site.Master file also if your site uses master pages
Left by tameem zaaiter on Dec 24, 2010 7:49 PM

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

Requesting Gravatar...
Hi,
i am new to deployment task
can any one please tell me is
moving pdb files to production server is advisable?
if so why
Left by ramesh on Dec 28, 2012 10:49 AM

Your comment:

 (will show your gravatar)