Click here to Skip to main content
15,893,337 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi,

What is the difference between debug and release?

When we use web.config - debug and web.config - release?

How can we redirect to an sample page when error occurs at runtime without using -
a)response.redirect() or
b)custom errors in web.config file


I have searched in Google, I couldn't get correct answer.

Please let me the answer.
Thanks in advance.
Posted
Updated 9-Dec-11 2:45am
v2

1 solution

The biggest difference between these is that:
In a debug build the complete symbolic debug information is emitted to help while debugging applications and also the code optimization is not taken into account.
While in release build the symbolic debug info is not emitted and the code execution is optimized.
Also, because the symbolic info is not emitted in a release build, the size of the final executable is lesser than a debug executable.

One can expect to see funny errors in release builds due to compiler optimizations or differences in memory layout or initialization. These are ususally referred to as Release - Only bugs :)

In terms of execution speed, a release executable will execute faster for sure, but not always will this different be significant.

It is Extracted from the below link:
http://haacked.com/archive/2004/02/14/difference-between-debug-vs-release-build.aspx[^]


Custom Errors Section:

XML
<configuration>
  <system.web>
    <customErrors defaultRedirect="GenericError.htm"
                  mode="RemoteOnly">
      <error statusCode="500"
             redirect="InternalError.htm"/>
    </customErrors>
  </system.web>
</configuration>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900