What can cause the value in Application variable to disappear?

Discussion in 'ASP General' started by evangeline, Jun 24, 2005.

  1. evangeline

    evangeline Guest

    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!!
     
    evangeline, Jun 24, 2005
    #1
    1. Advertising

  2. evangeline wrote:
    > 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

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jun 24, 2005
    #2
    1. Advertising

  3. evangeline

    GermanK.Net Guest

    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:
    > evangeline wrote:
    > > 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
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
     
    GermanK.Net, Jun 24, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravi Ambros Wallau
    Replies:
    2
    Views:
    3,960
    Ravi Ambros Wallau
    Jan 13, 2006
  2. Replies:
    7
    Views:
    353
    Jim Langston
    May 23, 2006
  3. Stefan Bosman

    value of variables disappear

    Stefan Bosman, Dec 13, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    332
    Hans Kesting
    Dec 13, 2007
  4. Jack
    Replies:
    3
    Views:
    226
  5. John Reye
    Replies:
    14
    Views:
    799
    Tim Rentsch
    May 8, 2012
Loading...

Share This Page