I've got a web app that has the debug parameter in the web.config file
set to true. Everything works great. However, I want to set debug to
false before putting the app into production. When I do so, I get an
error that states; "Object reference not set to an instance of an
object". It also does not have any more information and tells me to set
debug to true to see more info. But of course, when I set debug to
true, the app works fine!
So, my question is, what could be causing an error to appear only when
debug is set to false? Thanks.
Dana 3 1643
Do you use Debug.Assert statements?
Do you have any code inside of a conditional directive (#if) that only executes
during debug?
It sounds as if the code paths are different for debug and release, and these
are two scenarios I can think of off the top of my head that can cause the
problem.
--
Scott http://www.OdeToCode.com/blogs/scott/ I've got a web app that has the debug parameter in the web.config file set to true. Everything works great. However, I want to set debug to false before putting the app into production. When I do so, I get an error that states; "Object reference not set to an instance of an object". It also does not have any more information and tells me to set debug to true to see more info. But of course, when I set debug to true, the app works fine!
So, my question is, what could be causing an error to appear only when debug is set to false? Thanks.
Dana
Scott, went back and checked.... no Debug.Assert statements, no
conditional directives, no Trace used... I'm really stumped.
D
I think the next step would be to some sort of stack trace to see where the
exception comes from. If you build and deploy the PDB files you should get
more info:
Project -> Properties -> Configuration Properties -> Build -> Outputs ->
set Generate Debugging Information to "true".
--
Scott http://www.OdeToCode.com/blogs/scott/ Scott, went back and checked.... no Debug.Assert statements, no conditional directives, no Trace used... I'm really stumped.
D This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Carpe Diem |
last post by:
Hello I have an aspx page that loses Session("user") value after a few
minutes even after I set
<sessionState mode="InProc" cookieless="false" timeout="300"> in web.config
and wrote
function Session_Start() {
Session.Timeout = 3000;
}
in global.asax
|
by: Jeremy S. |
last post by:
By default, Web.config has the following section:
<compilation
defaultLanguage="c#"
debug="true"
/>
note that debug="true"
There is a comment - also in the default Web.config - that states that
making debug="false" will result in faster performance but a loss of
|
by: Mr Newbie |
last post by:
Debug.Assert( False, "Why wont I display ??")
I am trying to use this in my code but it wont display. The app is running
on my local machine and the above code under a button click event.
What am I missing ?
Cheers mr N . . .
|
by: wcchan |
last post by:
Hi,
We set debug="false" at web.config of a WebService for performance sake. We
found that after set, the web service request will sometimes got a timeout
exception. Would anyone tell me how long the web service request be timeout
and how to configure the timeout limit of the webservice calls?
Thanks advance.
|
by: Alexander Walker |
last post by:
Hello
I have recently published a web application using the "Publish Web Site" option
of the solution explorer from Visual Studio 2005, I have published the website
so that the pages could not be updated, do I need to set the web.config so that
it contains <compilation defaultLanguage="c#" debug="false"> before I publish
the web site or can...
| |
by: Cas |
last post by:
Hi,
If i omit to mention e.g. the option 'debug' in the line below of an aspx
file, does it means it's set to false?
<%@ Page Language="VB" CodeFile="any.aspx.vb" Inherits="_Default" %>
Thanks
Cas
|
by: André |
last post by:
Hi,
I put that question already, but it's still not very clear to me, so ...
Assume following option in web.config=
debug="false"
but in one aspx page (test.aspx)
<%@ debug="true" ..%>
|
by: news.microsoft.com |
last post by:
I have an asp.net 2.0 project that when I change the build configuration to
release I get the following error:
Command line error BC2014: the value 'None' is invalid for option
'debug'.
If I go into the projects Advanced Compile Options and change the Generate
Debug Info dropdown from None to PDB-Only the error goes away. Can anyone...
|
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...
|
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. ...
|
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...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |