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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...WhatWhat's the earliest point I can hook into the DNN request lifecycle?
Previous
 
Next
New Post
6/30/2010 7:22 AM
 
I want to do some 301 redirects based on complex validation of querystring parameters against data held in the database. I don't believe an HttpModule is the right way to go because I want the DNN environment to be available when I do the work and I don't believe the Portal would be configured within an HttpModule.

I could alter Default.aspx.vb and make it inherit from MyClass (which would inherit DotNetNuke.Framework.CDefault) but then I need to remember to re-do the changes after any DNN updates so this is not ideal.

Anyone got any ideas?

Regards,
Rhys

www.rmjcs.com - Mostly SQL Server Stuff
 
New Post
6/30/2010 7:34 AM
 
Actually, an HttpModule is the appropriate place to hook into the process.  The trick is to make sure that the module appears after the standard DotNetNuke HTTPModules, with the most important one being the UrlRewriter.  The UrlRewriter sets up the most important part of the environment which is the PortalSettings.  Once you have portalsettings, everything else is accessible through the API.

Joe Brinkman
DNN Corp.
 
New Post
7/1/2010 6:17 AM
 
Hi Joe,

Thanks for the prompt reply - maybe I should have tried it before assuming it wouldn't work :(

As you pointed out the order of the HttpModules as defined in web.config is important. The only thing I would add for anyone else reading this is that the MembershipModule doesn't set the UserInfo until the AuthenticateRequest event of the HttpApplication object so this data isn't available in earlier events.

Thanks,
Rhys

www.rmjcs.com - Mostly SQL Server Stuff
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...WhatWhat's the earliest point I can hook into the DNN request lifecycle?


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