Re: Keeping objects between requests within the same session
From: Don (unknown_at_oblivion.com)
Date: 02/26/04
- Next message: Nikhil Patel: "Re: javascript:__doPostBack error"
- Previous message: William F. Robertson, Jr.: "Render webpage with attachment"
- In reply to: Teemu Keiski: "Re: Keeping objects between requests within the same session"
- Messages sorted by: [ date ] [ thread ]
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
>
>
>
- Next message: Nikhil Patel: "Re: javascript:__doPostBack error"
- Previous message: William F. Robertson, Jr.: "Render webpage with attachment"
- In reply to: Teemu Keiski: "Re: Keeping objects between requests within the same session"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|