Re: Keeping objects between requests within the same session

From: Don (unknown_at_oblivion.com)
Date: 02/26/04


Date: Thu, 26 Feb 2004 21:45:39 GMT

I tried using that, but when working with my Windows App accessing the DLL,
the HttpContext.Current.Session resolves to Nothing. Is there some way to
initialize it? When I had my code working with just HttpContext.Current, I
needed to put the following line at the start of my Windows app:

HttpContext.Current = New HttpContext(Nothing, Nothing)

to initialize it, so to speak (I imagine this is explicitly doing what, in a
way, the environment is doing for my ASP.NET program). I don't know what to
do to initialize HttpContext.Current.Session at the start of my Windows app,
though.

- Don

"Teemu Keiski" <joteke@aspalliance.com> wrote in message
news:OCzt57K$DHA.1548@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> HttpContext.Current.Session
>
> --
> Teemu Keiski
> MCP, Microsoft MVP (ASP.NET), AspInsiders member
> ASP.NET Forum Moderator, AspAlliance Columnist
>
> "Don" <unknown@oblivion.com> wrote in message
> news:wqt%b.605594$JQ1.508433@pd7tw1no...
> I have an ASP.NET program that references a VB.NET DLL. I had originally
> planned for my DLL to put things in the HttpContext.Current collection so
> that the ASP.NET can access them throughout an entire session (according
to
> a tip I saw on a website somewhere), but it turns out that it only lasts
for
> the current page request. If another page is requested, the contents of
> HttpContext.Current are cleared. Except for the lack of proper scope,
> HttpContext.Current gives me the functionality that I need.
>
> Is there another class I can throw this stuff into, similar to the way
> HttpContext.Current works, that will let the objects last for the entire
> session and not just the current request? In ASP.NET there's a Session
> class which has the right scope, but I don't know how -- or even if it's
> possible -- to access that class from by VB.NET DLL.
>
> - Don
>
>
>



Relevant Pages

  • Re: Keeping objects between requests within the same session
    ... namespace iGoBusinessManager.Runtime ... I tried using that, but when working with my Windows App accessing the DLL, ... to initialize it, so to speak (I imagine this is explicitly doing what, in a ... > the current page request. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: MAPIInitialize(NULL) used to fail after 10-15 successfully attempts!!!
    ... Application is a java code which loads this DLL from ... (initialize and uninitialize each time) ... What was the error when you left MAPI initialized? ... Why not call MAPIInitialize once when your app starts and leave MAPI ...
    (microsoft.public.win32.programmer.messaging)
  • Re: MAPIInitialize(NULL) used to fail after 10-15 successfully attempts!!!
    ... I dont know how to degug a dll using VC++. ... and MAPI Developer Tool ... (initialize and uninitialize each time) ... Why not call MAPIInitialize once when your app starts and leave MAPI ...
    (microsoft.public.win32.programmer.messaging)
  • Custom classes with web services
    ... I also have a Windows app that will reference a couple of web services. ... Each web service references the .dll to get the user class. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Need some advice
    ... My dll has a class that must be initialized before any ... In the DEMO config, the static Initialize() ... I'm currently writing a remote deployment tool. ...
    (microsoft.public.dotnet.framework)