HighTechTalks DotNet Forums  

Re: application variables caching and application context

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss Re: application variables caching and application context in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ben Strackany
 
Posts: n/a

Default Re: application variables caching and application context - 04-26-2005 , 10:18 AM






Is the web services under a different virtual directory? That might do it.
Or, if you're running Windows 2003/IIS6, check the Application Pool settings
& confirm that the number of threads is 1 (not 2+).

--
Benjamin Strackany
http://www.developmentnow.com


"Stu" <Stu (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I have a web service which under certain conditions flushes and reloads
application variables using HttpApplicationState


Dim objApplication As HttpApplicationState

objApplication = HttpContext.Current.Application

objApplication.Lock()

objApplication("systemVarDS") = objCacheData.getSystemVarList
............................
objApplication.unLock()

When I view the application variables from an aspx page on the same server
using

script runat="server"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

if not page.ispostback then

' Dim objApplication As HttpApplicationState
Dim lnIndex As Integer = 0
' ObjApplication = HttpContext.Current.Application


If Application.Count = 0 Then
Response.Write("No Variables Defined")
Else
For lnIndex = 0 To Application.Count - 1

Response.Write(Application.Contents.GetKey(lnIndex ).ToString & " " &
Application(lnIndex).ToString)
Next


End If
end if
End Sub
/script

it tells me i have no application variables

Any ideas TIA ?

Stu



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.