Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Application variables lost in debug mode

Reply
Thread Tools

Application variables lost in debug mode

 
 
msteinwender@gmail.com
Guest
Posts: n/a
 
      08-29-2005
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!

 
Reply With Quote
 
 
 
 
Alvin Bruney - ASP.NET MVP
Guest
Posts: n/a
 
      08-29-2005
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
-------------------------------------------------------



<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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!
>



 
Reply With Quote
 
 
 
 
msteinwender@gmail.com
Guest
Posts: n/a
 
      08-29-2005
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

 
Reply With Quote
 
msteinwender@gmail.com
Guest
Posts: n/a
 
      08-29-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
netvmini.sys still not working on Windows 7 even after driver signing disabled ?! (Windows debug mode necessary for debug drivers ???) Skybuck Flying Windows 64bit 3 08-09-2009 05:54 AM
unable to compile and link application in Debug mode with library in Release mode sujeet C Programming 5 09-16-2007 05:23 PM
User Control access fails in debug mode, works in release mode rbg ASP .Net 0 01-17-2007 10:51 PM
Response.Redirect is slooow in debug mode, ok in release mode =?Utf-8?B?TWF4?= ASP .Net 0 02-11-2006 12:37 AM
Debug mode dll's vs release mode dll's? Dave ASP .Net 0 02-20-2004 03:49 AM



Advertisments