What can cause the value in Application variable to disappear?

E

evangeline

We have ASP application running on IIS 5.1 and Windows 2000 server. The ASP
application has few Application variables setup in global.asa. Something like
this:
Application.Lock()
Application("fun")="play"
Application.UnLock()

There is no other code in the ASP application to change the value in the
Application variables. It's only set in global.asa and the rest of the
application just read it with code similar to this:
Response.Write(Application("fun"))

The application had been running fine until we deployed a COM DLL to the web
server few weeks ago. Loos like the ASP application started to loose the
value in application variable few times a day. Restarting the web service,
which means re-initialize the value in Application object, fixes the issue
but the value will be blanked out again after few hours.

The COM DLL is written in .Net C# to handle some task. This COM has "private
static" variables in public class. The purpose for "private static" variables
is that the value will be maintained until IIS is restarted.

Is it possible that the memory space for .Net run-time conflicts with the
memory space of ASP Application object? Can someone help me understand what
can cause this to happen?

Thanks a lot!!
 
B

Bob Barrows [MVP]

evangeline said:
We have ASP application running on IIS 5.1 and Windows 2000 server.
The ASP application has few Application variables setup in
global.asa. Something like this:
Application.Lock()
Application("fun")="play"
Application.UnLock()

There is no other code in the ASP application to change the value in
the Application variables. It's only set in global.asa and the rest
of the application just read it with code similar to this:
Response.Write(Application("fun"))

The application had been running fine until we deployed a COM DLL to
the web server few weeks ago. Loos like the ASP application started
to loose the value in application variable few times a day.
Restarting the web service, which means re-initialize the value in
Application object, fixes the issue but the value will be blanked out
again after few hours.

I would rather create a page that does what you do in the
application_onstart event in global.asa. If the variable is empty, use
Server.Execute to run that page instead of throwing an error, or whatever
consequence is happening to cause you to restart your application.
The COM DLL is written in .Net C# to handle some task. This COM has
"private static" variables in public class. The purpose for "private
static" variables is that the value will be maintained until IIS is
restarted.

Is it possible that the memory space for .Net run-time conflicts with
the memory space of ASP Application object? Can someone help me
understand what can cause this to happen?
I've never seen anything like this. Sorry.

Bob Barrows
 
G

GermanK.Net

I'm having the same problem with ASP 3.0 & IIS 5.0, but it's related
only to application variables containing multidimensional arrays. It's
very strange, it happens randomly during high & low server load time...

Anybody knows anything about it?

Thanks
Germán Kondolf
System Architect .Net

Bob Barrows [MVP] ha escrito:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top