473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Application variables lost in debug mode

Here is the scoop and any help is appreciated!

In my Global.asax file I am creating an object and setting that object
to an Application("obj") variable. The object gets created with no
problems and the application variable is set successfully to that
object.

Once the Global.asax page has finished the Application_Start routine
the startUp page (deploy.aspx) is loaded. On that page my application
variables are now null. Even application variables such as a string or
integer are now set to NULL

Here are my dev settings:
Win XP
IIS 6 & IIS 5 (not sure if that is an issue)
IE 6
Web.config file <sessionState mode="InProc"
I am debugging on my local machine (no web farm)
No framesets
Cookies Enabled

I have spent most of the day reading articles and experimenting with
different solutions to similar issues to no avail. So I am posting my
problem with the hope that someone can help me.

Thanks in advance!

Nov 19 '05 #1
3 2025
one thing it could be, assuming you have covered ALL your bases, the
application pool could be restarting. I'm not sure why that would happen
though but it would cause your objects to be lost. To either confirm or rule
it out, check your eventwr to see if the processes were recycled.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET
-------------------------------------------------------

<ms**********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Here is the scoop and any help is appreciated!

In my Global.asax file I am creating an object and setting that object
to an Application("obj") variable. The object gets created with no
problems and the application variable is set successfully to that
object.

Once the Global.asax page has finished the Application_Start routine
the startUp page (deploy.aspx) is loaded. On that page my application
variables are now null. Even application variables such as a string or
integer are now set to NULL

Here are my dev settings:
Win XP
IIS 6 & IIS 5 (not sure if that is an issue)
IE 6
Web.config file <sessionState mode="InProc"
I am debugging on my local machine (no web farm)
No framesets
Cookies Enabled

I have spent most of the day reading articles and experimenting with
different solutions to similar issues to no avail. So I am posting my
problem with the hope that someone can help me.

Thanks in advance!

Nov 19 '05 #2
I checked the Event Viewer Application, Security and System logs and
there is no activity there. Thanks for your suggestion Alvin.........I
was hoping it would help. You gave me a hand with some OWC stuff a
while back and that was very usefull.
Do you have any other suggestions?

It does not seem that the application is restarting considering the
object takes approx 20 seconds to load into memory as serializable

Nov 19 '05 #3
Ok this is what happened.......really stupid but hey what can I do
about it now.

Before the Page_Load I was assigning a local variable to the
Application("obj") and the page was crapping out there, it appeared
that my Application sessions were being lost

So I moved my object variable into the page load and there was my
Application variable. So lesson is don't set any variables to sessions
outside of the Page_load event

Thanks Alvin for your advice. I will remember to look there if any else
funny starts happening.

Cheers

Nov 19 '05 #4

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

Similar topics

0
by: Sorin | last post by:
Hi all I have a .NET application that is using few ActiveX DLL wrote in VB6. I managed to get the most from my previous VB6 controls by using them in .NET but sometimes when I am using my...
12
by: nospam | last post by:
All the documentation says that leaving an ASP.NET application in debug mode has a big performance hit. I can't detect any difference between debug and non-debug modes. Am I missing something or is...
0
by: Daniel Smith | last post by:
Some more information. The reason for the variables being lost is that the Session_Start event is being called several times and this then clears the variables but not the Session Id. The...
12
by: Micah | last post by:
I am looking for a way to tell if the program is compiled in debug mode, I want the application I am writing to spit out a message to QA if a error occured and if it is in debug mode, but if it is...
1
by: Rob R. Ainscough | last post by:
I ran a clean solution on my set of core assemblies (DLLs) and rebuild -- now my windows forms application can no longer "step into" my core DLL references via Debug mode? Any suggestions? I...
1
by: newjazzharmony | last post by:
When I run an ASP dot net application in debug mode and put a breakpoint inside the Application_Start event (in global.asax.cs), sometimes it stops there and sometimes it doesn't. I was under...
5
by: B. | last post by:
We just recently move to code from VC++6 to VC++.NET 2005 and upgrade the warning level from 3 to 4. In debug mode, we compile the application with no warning no error, but when I build it in...
0
by: Guillaume Charhon | last post by:
Hi, I have a problem with Visual Studio 2005. When I run an application in the debug mode, and I press the ALT key, I have this error : L'Assistant Débogage managé 'LoaderLock' a détecté un...
5
by: sujeet | last post by:
Dear friends, I'm facing a strange problem... My Application is in Debug mode, and the third party static library i'm using is in release mode. When i compile and try to link my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.