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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Calling AddModuleMessage from seperate thread using delegate?Calling AddModuleMessage from seperate thread using delegate?
Previous
 
Next
New Post
5/11/2009 12:51 PM
 

I am trying to write a module which passes some information and a delegate from the view to the controller, processes it, and launches a seperate thread. This thread then uses the delegate to run a method in the view class again when it is complete. This method that is run at the end contains the following:

UI.Skins.Skin.AddModuleMessage(Me, message, Skins.Controls.ModuleMessage.ModuleMessageType.GreenSuccess)

Where the 'message' parameter is passed back from the thread. All of this works fine with the function being called, but the line above throws the exception "Object reference not set to an instance of an object". When checking this in the debugger, i found that the "Me" object had this same exception in many of its fields, so my guess is this has to do with the thread calling a page that is being reloaded, or something similar.

Does anyone know a way to correct the problem, or to call AddModuleMessage from the controller class (or a seperate thread)?

 

 

 
New Post
5/12/2009 5:22 PM
 

I am not sure how well this will work, since once you go off on the other thread, you are outside of the http context, and request process.  My guess is that me represents a new page instance, rather than the one that was the starter of the thread.  This is just a guess, as I haven't personally worked with any modules that spawn threads that on callback update the UI.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Calling AddModuleMessage from seperate thread using delegate?Calling AddModuleMessage from seperate thread using delegate?


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