Developer forum

Forum » CMS - Standard features » Run code on extranet login page

Run code on extranet login page

Lars Larsen
Reply
Hi,
I would like to run some code before an extranetlogin page is rendered. How can that be achieved, any suggestions? I have looked at the notifications, but it seems like no one can be used for this purpose.

Replies

 
David Matheson
Reply
Hi,
Can you be a bit more specific in what you want to achieve please.

Cheers
David

 
Lars Larsen
Reply

Hi David,
I would like to add this code:
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache)
to pages secured by the extranet module. I need to add the code in order to prevent extranet login in this scenario:
1) extranet user logs in
2) the secured page is presented for the extranet user
3) extranet user logs out (/Admin/Public/ExtranetLogoff.aspx)
4) user presses the back button in the browser and gets a "Webpage has expired" page (I have added "NoCache" to the secured page)
5) user presses F5 (refresh) and he/she is logged in again, without entering username and password, because these fields are resend from the cached page.

I have added HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache) to the page in a Standard.Page.PageTitle subscriber, by testing if the page contains a specific custom tag. Perhaps I need to add the NoCache code to the page with the extranet login formular in the same way?

 

You must be logged in to post in the forum