473,811 Members | 3,314 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

web.config <compilation> Element

Rob
By default, the web.config file of an ASP.NET application contains the
following debug attribute for the compilation element:

<compilation debug="true"/>

My question is this: When doing the the final build, the compile of the
application is done in "Release" mode. The .dll file is created without a
..pdb file. Is it still necessary to change the debug attribute to "false"
during the final build when compiling in "Release" mode appears to override
debug="true" anyway?

Thank you for any help in advance.
Nov 19 '05 #1
5 7119
Rob wrote:
My question is this: When doing the the final build, the compile of
the application is done in "Release" mode. The .dll file is created
without a .pdb file. Is it still necessary to change the debug
attribute to "false" during the final build when compiling in
"Release" mode appears to override debug="true" anyway?


The two aren't really the same thing. You should ALWAYS set debug = false
in the web.config in a production application.

ASP.NET code explicitly disables batch compilation when debug = true. That
means that every page that gets hit creates its own dynamic assembly. These
assemblies get scattered all over the address space and fragment memory.
The result is that you dramatically increase the probability of an OOM
exception. There are also other drawbacks such as the batch timeout value
being ignored which can cause other problems down the chain.

It's a VERY bad idea to have debug=true in a production app.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003


Nov 19 '05 #2
Using <compilation debug="false"/> will, at least,
stop ASP.NET from *trying* to find debug symbols if an error occurs.

Whether VS.NET compiles .pdb files, or not, is not the critical point.

The issue is whether ASP.NET attempts to find debug symbols,
or not, when the application is running on your production server.;

You should *always* include <compilation debug="false"/>
in your production server's web.config.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Rob" <Ro*@discussion s.microsoft.com > wrote in message
news:A2******** *************** ***********@mic rosoft.com...
By default, the web.config file of an ASP.NET application contains the
following debug attribute for the compilation element:

<compilation debug="true"/>

My question is this: When doing the the final build, the compile of the
application is done in "Release" mode. The .dll file is created without a
.pdb file. Is it still necessary to change the debug attribute to "false"
during the final build when compiling in "Release" mode appears to override
debug="true" anyway?

Thank you for any help in advance.

Nov 19 '05 #3
Juan T. Llibre wrote:
Using <compilation debug="false"/> will, at least,
stop ASP.NET from *trying* to find debug symbols if an error occurs.

Whether VS.NET compiles .pdb files, or not, is not the critical point.

The issue is whether ASP.NET attempts to find debug symbols,
or not, when the application is running on your production server.;

You should *always* include <compilation debug="false"/>
in your production server's web.config.


ASP.NET (or more accurately, the CLR) doesn't use symbols in this way.
Stack traces and method name information are obtained via tokens. Symbols
are not necessary. Having debug == true just gives you a single assembly
for each page which is necessary in order to debug it.

Symbols are still needed if you want line numbers or source file names (or
source code debugging.)

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003


Nov 19 '05 #4
I'll stand by :
You should *always* include <compilation debug="false"/>
in your production server's web.config.
;-)

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"JIMCO Software" <co*******@jimc osoftware.com> wrote in message
news:eW******** *****@tk2msftng p13.phx.gbl... Juan T. Llibre wrote:
Using <compilation debug="false"/> will, at least,
stop ASP.NET from *trying* to find debug symbols if an error occurs.

Whether VS.NET compiles .pdb files, or not, is not the critical point.

The issue is whether ASP.NET attempts to find debug symbols,
or not, when the application is running on your production server.;

You should *always* include <compilation debug="false"/>
in your production server's web.config.


ASP.NET (or more accurately, the CLR) doesn't use symbols in this way. Stack traces and
method name information are obtained via tokens. Symbols are not necessary. Having
debug == true just gives you a single assembly for each page which is necessary in order
to debug it.

Symbols are still needed if you want line numbers or source file names (or source code
debugging.)

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003

Nov 19 '05 #5
Juan T. Llibre wrote:
I'll stand by :
You should *always* include <compilation debug="false"/>
in your production server's web.config.


;-)


Sometimes my verbosity switch gets stuck. ;)

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1165
by: Tiraman | last post by:
Hi, Can some one explain me why do i need to compile a web application or in other words , what is the deference between 2 web sites (same files) but one of them was compiled and the other wasn't ? 10x
2
6803
by: Jiho Han | last post by:
This has been asked many times before but it seems there haven't been clear answers. I have an application root at http://localhost and subdirectories http://localhost/app1
2
1401
by: Jiho Han | last post by:
I was wondering whether it was possible to change the default ASP.NET compilation behavior. I know that there is <compilation> element in the config where you can specify quite a few things including the compiler options, assemblies to link, etc. However, I can't seem to find a way to have the compiler add/use certain path to locate the dlls. I tried setting compilerOptions attribute of the <compiler> element...
1
1466
by: MattC | last post by:
Hi, Can I simply set <compilation debug="false"> in my web.config file once I have deployed my code to the live server. My class libraries and codebehind was Built in VS2003 in release mode. Thanks MattC
5
1383
by: inetmug | last post by:
I would like my ASP.NET apps to pick up there associated assembly references at runtime but I do not see a runtime tag in the web.config schema, or am I wrong? -- Patrick
4
1100
by: WebBuilder451 | last post by:
After conversion my web.config flaggs this element as an invalid child of compilation. The solution runs ok. however, when i makes a change that causes an error on compile this will get flagged by the compilier. Is there a listing of items that need manuel cleanup after conversion? -- thanks (as always) some day i''m gona pay this forum back for all the help i''m getting kes
1
4468
by: Jonas | last post by:
Hi, I've recently found out that I'm supposed to set the debug attribute of the compilation element in web.config to false in production environments. But when I do so in my ASP.NET application, I get strange errors. Apparently, a javascript file that I specify in the vb-code doesn't get called, I and when I check the source sent to the browser, I can see that the call to the javascript file is changed so that the filename is prefixed by...
5
1946
by: Nathan Sokalski | last post by:
My Web.config file contains the following section to register some of my UserControls: <pages> <controls> <add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/> <add tagPrefix="NATE" tagName="Navigation" src="~/Navigation.ascx"/> </controls> </pages>
1
3713
by: John Bailo | last post by:
I converted an ASP.net project from VS03 to VS05. There is one warning, for web.config: Warning 1 The element 'compilation' has invalid child element 'compilers'. List of possible elements expected: 'assemblies, buildProviders, codeSubDirectories, expressionBuilders'. What should I do?
0
9731
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3871
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.