Mitchel's Forums

Subject: Thread Exception when adding Module to page
Prev Next
You are not authorized to post a reply.

AuthorMessages
mikeUser is Offline
New Poster
New Poster
Posts:13

02/23/2008 1:09 PM  

Hi,

I have created a very simple module with just one label that says "Hello world".  It is a C# based module. Everything compiles fine and i am able to launch the webstite at that point.  I go through the necessary steps of adding the module definition throuh the DNN admin pages and all is well.   I then create a new page and attempt to add the module to this page through the control panel using "Add new module" function at the top...nothing happens when i click "Add".  When i fire up the debugger and repeat the steps to add the module to the page, i see the error below after clicking on the "add" link:

 

"A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll"

 I stepped through the code and found the problem occurs in ControlPanel\IconBar.ascx.vb, in method AddModule_Click.  In particular, this line:

Response.Redirect(Request.RawUrl, True)

 

After some research, i change the "True" to "False" and repeat the steps.  This time i do not see the thread exception, but still the module is not added to the page.   This DOES NOT happen for other modules that shipped with DNN.  I can add those fine.  It's just these new simple module that are exhibiting this issue.

Any thoughts on this?

Thankyou,

Mike

mikeUser is Offline
New Poster
New Poster
Posts:13

02/24/2008 3:05 AM  
After changing the second parameter of Redirect to FALSE, I figured out the reason it was still not working was that my module did not extend DotNetNuke.Entities.Modules.PortalModuleBase. I was a bit disappointed that there was no error or other notification indicating this was the problem.
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

02/25/2008 10:30 AM  
Mike,

Sorry that I ddin't get back to you on this one until now.

Yes, that is one thing that is sadly a bit troubling is if you don't extend from the proper base class you get NO additional information that can help you.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
You are not authorized to post a reply.
Forums >Development Discussion >.NET Development > Thread Exception when adding Module to page



ActiveForums 3.7