Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...redirect after login?redirect after login?
Previous
 
Next
New Post
10/24/2012 6:32 PM
 

Hi Folks,

Im nor sure if 'redirect' is the term Im looking for here.

Background:

I have a DNN intranet site set up so that all users are authenticated via LDAP. Before viewing the site all users are automatically signed in based on their network credentials. The first page everyone hits when surfing to the url (after authentication) is a terms of use page, the user clicks 'agree' and is then directed to the homepage.

 Issue:

When a user uses a bookmark to get to a page, they are forced to go through the terms of use and click 'agree' if they haven't already signed on (sessions expire after 30mins). The user must click their bookmark twice in order to get to the page they want.

 Question:

How can I configure DNN to remember the url a user was trying to reach and then direct them to their page after they have clicked the 'agree' button on the mandatory TOU page?

Thanks!

 
New Post
10/24/2012 7:24 PM
 
A few things:

1.) It depends on where you are doing a redirect to the agree page. Usually if I want to do something this, I make sure the code that is doing the redirect to the terms page would pass in a ReturnUrl.

2.) When the code executes for the "agree" button I have the them redirect to the returnurl parameter (if it exists), otherwise the homepage.

Scott McCulloch
Developer, F5 Networks
Owner, Ventrian DotNetNuke Modules
 
New Post
10/25/2012 10:34 AM
 

Hi Scott,

Thanks for the response. "returnURL" is the term that was escaping me. 

Would you happen to have an example or a url of the code that would accomplish this?

In our setup, Ive got a bit of code on every page (in the skin file) that determines if a user has been authenticated. If 'yes' then they can surf the site, if 'no' they are redirected to the sign in page (https://ourIntranet/DesktopModules/AuthenticationServices/ActiveDirectory/WindowsSignin.aspx).

This is the code im using on each page to 'force' sign-in.

<%if not Request.IsAuthenticated Then%>
<%Response.Redirect("https://ourIntranet/DesktopModules/AuthenticationServices/ActiveDirectory/WindowsSignin.aspx")%>
<%End If%>

Any suggestions on how to get the returnURL so the user will be directed to their chosen page rather than the home page after authentication?

Thanks!

Jeremy

 
New Post
10/26/2012 6:19 AM
 

Hi

Here you can use code as below:

string returnUrl = HttpContext.Current.Request.RawUrl;
returnUrl = HttpUtility.UrlEncode(returnUrl);

And assign this to query string as below:
Your Redirect Url + "?returnurl = returnUrl"

You can also check your dnn site login page present in admin\skins folder.

Thanks
Sibabrata
Mindfire Solutions

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...redirect after login?redirect after login?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out