473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Remember theme on session timeouts

(using asp.net 2.0)

Hi,

I have 5-6 large customers each using the same pages, but with their own
themes.

To enter my site, they all have their own urls like ...

http://mysite.com?site=customer1
http://mysite.com?site=customer2
http://mysite.com?site=customer3
and so on.

When they start a session, I test for the site querystring and sets the
theme accordingly. I store their theme in a session variable.

My problem is, when their session times out, I can't tell what theme
they should see.

I can't use cookies to store their theme, because of security/privacy
reasons. Therefore I can't use profiles.

My idea was to add a "site=customerX" to all my urls, but I need a
simple way to add this querystring to all my rendered urls.

Is there a more simple way?

Do you have a better suggestion how to solve this?

Thanks in advance!!!

Mojo

May 23 '06 #1
3 1214
> My idea was to add a "site=customerX" to all my urls, but I need a simple
way to add this querystring to all my rendered urls.
An easier eway would be to create a simple ihttpmodule that inserts a hidden
field into each returned web page identifying the theme in the EndRequest
event. Something like this would help you get started.

http://www.devx.com/dotnet/Article/6962/0/page/4

--
Regards

John Timney
Microsoft MVP

"M O J O" <na@na.na> wrote in message
news:up**************@TK2MSFTNGP05.phx.gbl... (using asp.net 2.0)

Hi,

I have 5-6 large customers each using the same pages, but with their own
themes.

To enter my site, they all have their own urls like ...

http://mysite.com?site=customer1
http://mysite.com?site=customer2
http://mysite.com?site=customer3
and so on.

When they start a session, I test for the site querystring and sets the
theme accordingly. I store their theme in a session variable.

My problem is, when their session times out, I can't tell what theme they
should see.

I can't use cookies to store their theme, because of security/privacy
reasons. Therefore I can't use profiles.

My idea was to add a "site=customerX" to all my urls, but I need a simple
way to add this querystring to all my rendered urls.

Is there a more simple way?

Do you have a better suggestion how to solve this?

Thanks in advance!!!

Mojo

May 23 '06 #2
Hi John,

Thanks for helping me out here!!

The only problem I see with your solution is, if my customer bookmarks
my page, then when he returns, my app doesn't know what theme to use.

I need to put a "?site=xxx" in all the links in my pages. Can this be
archived easily?

Thanks again!!

Mojo

John Timney ( MVP ) skrev:
My idea was to add a "site=customerX" to all my urls, but I need a simple
way to add this querystring to all my rendered urls.


An easier eway would be to create a simple ihttpmodule that inserts a hidden
field into each returned web page identifying the theme in the EndRequest
event. Something like this would help you get started.

http://www.devx.com/dotnet/Article/6962/0/page/4

May 23 '06 #3
It could be achieved using the same approach, as you have access to the
stream of the response from within an ihttpmodule and you can manipulate it.
If you regexpr the links out from the stream body you could add the param
you seek to any found links. Of course you have to consider any high
traffic sites as needing load testing under this approach as its an extra
hit to the reponse.

Read this: Its about response.filter
http://www.devx.com/vb2themax/Article/19901/0/page/2

--
Regards

John Timney
Microsoft MVP

"M O J O" <na@na.na> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi John,

Thanks for helping me out here!!

The only problem I see with your solution is, if my customer bookmarks my
page, then when he returns, my app doesn't know what theme to use.

I need to put a "?site=xxx" in all the links in my pages. Can this be
archived easily?

Thanks again!!

Mojo

John Timney ( MVP ) skrev:
My idea was to add a "site=customerX" to all my urls, but I need a
simple way to add this querystring to all my rendered urls.


An easier eway would be to create a simple ihttpmodule that inserts a
hidden field into each returned web page identifying the theme in the
EndRequest event. Something like this would help you get started.

http://www.devx.com/dotnet/Article/6962/0/page/4

May 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Jim | last post by:
The dreaded Session state :-) All, Just to give a little background this is reagarding an ASP 3.0 application running on IIS6 using the default app pool. I have set the session timeout to 540...
1
by: Tim Meagher | last post by:
I am trying to use Forms Authentication for a web page with cookies and a session state. I'm getting a little confused about how to use both and how the timeouts work. My goal is to have a web...
3
by: Craig Storey | last post by:
I have a form where users logged in using sessions can edit articles in a WYSIWYG editor. Some of them take their time and don't like to save their work very often and occassionally the sessions...
2
by: mircu | last post by:
Hi, I need a quick solution to make my application behave correctly when one of these timeouts occurs. I have some logic in session_start but when the authentication cookie timeouts the user is...
1
by: - Steve - | last post by:
I use forms based authentication and I've been putting the username in Session State (Session). Then when a user posts I check that Session != null else I Session.Abandon() and...
2
by: Fraijo | last post by:
how can i disable session timeouts without affecting any program codings?
1
by: M O J O | last post by:
(using asp.net 2.0) Hi, I have 5-6 large customers each using the same pages, but with their own themes. To enter my site, they all have their own urls like ... ...
1
by: Ron | last post by:
I have an application that requires a login at each visit to the site and can only be accessed by a login. A user can have different themes depending if it was assigned in there profile. Theme...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
11
by: assor | last post by:
I have a website and I,m using a an application theme that consists of a skin and a cascading style sheet and I have vriety of master pages and it works fine. I use in my site a log in with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.