|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sharing session variables between applicationsHi 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 Dooza wrote:
> Hi there, Store them in a database instead of in Session> 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? -- 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" Bob Barrows wrote:
> Dooza wrote: Hi Bob, not something I really want to do, the shopping cart is stored >> 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 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 Dooza wrote:
Show quoteHide quote > Bob Barrows wrote: Well, you don't have much choice, b eyond making everthing on the site part >> 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. > of a single application .. > My current work around is to remove the application from the folder in Well, it seems you knew the answer after all. :-)> 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. > -- 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" Bob Barrows wrote:
Show quoteHide quote > Dooza wrote: I was hoping there would be another solution, but I can live with my >> 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. :-) workaround. Thanks for confirming it for me. Steve 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") 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 Roberto Franceschetti wrote:
> How about replacing the Session variables with Cookies (or using Cookies Hi Roberto, thank you for the suggestion, that would certainly help, I > 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") will consider that. Regards, Steve
Other interesting topics
Scripting.FileSystemObject GetFile method
recordset.addNew From an ASP page, is there a way write to an EXCEL file without having EXCEL installed on the IIS ma shorten the page address Listing Fields - advice needed truncated form POST type mismatch Prevent SQL injection error Populate Word template from ASP Date problem |
|||||||||||||||||||||||