Home All Groups Group Topic Archive Search About

Sharing session variables between applications

Author
5 May 2009 1:19 PM
Dooza
Hi there,
Windows 2003, so IIS6. I have a website that has a webshop. It is like
this: www.example.com/shop/ and I created an application for it in IIS.
I now want to expand the shop into other parts of the site, but the
sessions that are used in the application aren't available to other
parts of the site.

Is there a way to get the session variables available to the rest of the
site?

Cheers,

Steve

Author
5 May 2009 2:22 PM
Bob Barrows
Dooza wrote:
> Hi there,
> Windows 2003, so IIS6. I have a website that has a webshop. It is like
> this: www.example.com/shop/ and I created an application for it in
> IIS. I now want to expand the shop into other parts of the site, but
> the sessions that are used in the application aren't available to
> other parts of the site.
>
> Is there a way to get the session variables available to the rest of
> the site?

Store them in a database instead of in Session


--
Microsoft MVP - ASP/ASP.NET - 2004-2007
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"
Are all your drivers up to date? click for free checkup

Author
5 May 2009 2:43 PM
Dooza
Bob Barrows wrote:
> Dooza wrote:
>> Hi there,
>> Windows 2003, so IIS6. I have a website that has a webshop. It is like
>> this: www.example.com/shop/ and I created an application for it in
>> IIS. I now want to expand the shop into other parts of the site, but
>> the sessions that are used in the application aren't available to
>> other parts of the site.
>>
>> Is there a way to get the session variables available to the rest of
>> the site?
>
> Store them in a database instead of in Session

Hi Bob, not something I really want to do, the shopping cart is stored
in the session, and has been working nicely for several years.

My current work around is to remove the application from the folder in
IIS. It was using the default application pool, is this something I
should be worried about? I am guessing not, since the entire site is the
default application using the default pool.

Steve
Author
5 May 2009 2:49 PM
Bob Barrows
Dooza wrote:
Show quoteHide quote
> Bob Barrows wrote:
>> Dooza wrote:
>>> Hi there,
>>> Windows 2003, so IIS6. I have a website that has a webshop. It is
>>> like this: www.example.com/shop/ and I created an application for
>>> it in IIS. I now want to expand the shop into other parts of the
>>> site, but the sessions that are used in the application aren't
>>> available to other parts of the site.
>>>
>>> Is there a way to get the session variables available to the rest of
>>> the site?
>>
>> Store them in a database instead of in Session
>
> Hi Bob, not something I really want to do, the shopping cart is stored
> in the session, and has been working nicely for several years.
>
Well, you don't have much choice, b eyond making everthing on the site part
of a single application ..

> My current work around is to remove the application from the folder in
> IIS. It was using the default application pool, is this something I
> should be worried about? I am guessing not, since the entire site is
> the default application using the default pool.
>
Well, it seems you knew the answer after all. :-)

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
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"
Author
5 May 2009 2:54 PM
Dooza
Bob Barrows wrote:
Show quoteHide quote
> Dooza wrote:
>> Bob Barrows wrote:
>>> Dooza wrote:
>>>> Hi there,
>>>> Windows 2003, so IIS6. I have a website that has a webshop. It is
>>>> like this: www.example.com/shop/ and I created an application for
>>>> it in IIS. I now want to expand the shop into other parts of the
>>>> site, but the sessions that are used in the application aren't
>>>> available to other parts of the site.
>>>>
>>>> Is there a way to get the session variables available to the rest of
>>>> the site?
>>> Store them in a database instead of in Session
>> Hi Bob, not something I really want to do, the shopping cart is stored
>> in the session, and has been working nicely for several years.
>>
> Well, you don't have much choice, b eyond making everthing on the site part
> of a single application ..
>
>> My current work around is to remove the application from the folder in
>> IIS. It was using the default application pool, is this something I
>> should be worried about? I am guessing not, since the entire site is
>> the default application using the default pool.
>>
> Well, it seems you knew the answer after all. :-)

I was hoping there would be another solution, but I can live with my
workaround.

Thanks for confirming it for me.

Steve
Author
10 May 2009 9:38 PM
Roberto Franceschetti
How about replacing the Session variables with Cookies (or using Cookies
to store the "global" session values you're interested in maintaining
across applications? For example:

Response.Cookies("Settings")("UserName")= Session("UserName")
Response.Cookies("Settings")("FirstName")=  Session("FirstName")
Response.Cookies("Settings")("LastName")= Session("LastName")

--
Roberto Franceschetti
LogSat Software
http://www.logsat.com


Dooza wrote:
Show quoteHide quote
> Bob Barrows wrote:
>> Dooza wrote:
>>> Bob Barrows wrote:
>>>> Dooza wrote:
>>>>> Hi there,
>>>>> Windows 2003, so IIS6. I have a website that has a webshop. It is
>>>>> like this: www.example.com/shop/ and I created an application for
>>>>> it in IIS. I now want to expand the shop into other parts of the
>>>>> site, but the sessions that are used in the application aren't
>>>>> available to other parts of the site.
>>>>>
>>>>> Is there a way to get the session variables available to the rest of
>>>>> the site?
>>>> Store them in a database instead of in Session
>>> Hi Bob, not something I really want to do, the shopping cart is stored
>>> in the session, and has been working nicely for several years.
>>>
>> Well, you don't have much choice, b eyond making everthing on the site
>> part of a single application ..
>>
>>> My current work around is to remove the application from the folder in
>>> IIS. It was using the default application pool, is this something I
>>> should be worried about? I am guessing not, since the entire site is
>>> the default application using the default pool.
>>>
>> Well, it seems you knew the answer after all. :-)
>
> I was hoping there would be another solution, but I can live with my
> workaround.
>
> Thanks for confirming it for me.
>
> Steve
Author
11 May 2009 7:59 AM
Dooza
Roberto Franceschetti wrote:
> How about replacing the Session variables with Cookies (or using Cookies
> to store the "global" session values you're interested in maintaining
> across applications? For example:
>
> Response.Cookies("Settings")("UserName")= Session("UserName")
> Response.Cookies("Settings")("FirstName")=  Session("FirstName")
> Response.Cookies("Settings")("LastName")= Session("LastName")

Hi Roberto, thank you for the suggestion, that would certainly help, I
will consider that.

Regards,

Steve

Bookmark and Share