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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Customizing Global.asaxCustomizing Global.asax
Previous
 
Next
New Post
9/8/2007 1:14 PM
 

Or you could always read my blog on Simulating Application_Start event.


Joe Brinkman
DNN Corp.
 
New Post
9/8/2007 1:56 PM
 

The EventQueue was designed to handle this.

http://www.dotnetnuke.com/Community/BlogsDotNetNuke/tabid/825/EntryID/460/Default.aspx

http://www.dotnetnuke.com/Products/Development/Roadmap/EventQueue/tabid/942/Default.aspx

This is the way that all modules get their code executed on upgrades.

It will execute messages on Application_Start now:

EventQueue.EventQueueController.ProcessMessages("Application_Start")

Adding the ability for the core to handle the Application_BeginRequest would only require adding a single line of code to that event in the core.

EventQueue.EventQueueController.ProcessMessages("Application_BeginRequest")


DotNetNuke Modules from Snapsis.com
 
New Post
9/8/2007 7:34 PM
 

John,

  It is not clear from the above links how one would go about hooking up code to run on EVERY application start.  It looks like the config file could handle this, but that is not clear.  Also, is this still the correct method given the re-architecting that was done for the eventqueue?


Joe Brinkman
DNN Corp.
 
New Post
9/8/2007 8:48 PM
 

When I originally designed it, I only had the message being deleted from the queue if it had expired.  For one time execution all you had to do was set the expiration date to a time in the past.

It looks like since it has been refactored that every message is marked at as complete once it is processed which takes away a lot of the original functionallity.

It wouldn't be hard to fix it back though. In the procedure that gets the messages it should only get them if they are not expired.

This whole thread brings back a lot of memories. Can you believe it was almost 4 years ago that I was asking for the same thing?

http://forums.asp.net/p/439462/440945.aspx


DotNetNuke Modules from Snapsis.com
 
New Post
9/8/2007 9:14 PM
 

BTW.  The way that isComplete flag is set after processing the message now causes a problem if the code that is called does not return successfully. If this happens the message will keep trying to process the upgrade or whatever every time the application starts. There have been several reports of people saying their event log is filling with errors because of this.

Now one argument may be that the code needs to keep trying to execute on every application start, but I personally don't think that is a good idea since it is usually an error in the module code that will not go away. Plus, if the end user removes the module then they'll get new errors from the EventQueue trying to process a message for a module that is not there anymore.


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Customizing Global.asaxCustomizing Global.asax


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