Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5
This is the forum to discuss the Wrox book Professional DotNetNuke Module Programming by Mitchel Sellers and Shaun Walker - Wrox DotNetNuke Series Editor; ISBN: 978-0-470-17116-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 15th, 2009, 12:46 AM
Registered User
Points: 19, Level: 1
Points: 19, Level: 1 Points: 19, Level: 1 Points: 19, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default General Exception and Module Load Err

Hi Mitch,
Followed the book instructions, added your code to make sure it was correct , and have triple checked the manafest.

After I add the module to the page I recieve the following errors:

AssemblyVersion: 5.0.1
PortalID: 0
PortalName: DotNetNuke Development Site
UserID: 1
UserName: host
ActiveTabID: 55
ActiveTabName: Guestbook
RawURL: /dotnetnuke/Guestbook/tabid/55/Default.aspx
AbsoluteURL: /DotNetNuke/Default.aspx
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30618; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 1.1.4322)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 76a05f72-88fb-462b-b20b-1d3aa14cbc50
InnerException: Could not load type ' DesktopModules/GuestbookVB/ViewGuestbookVB.ascx '.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Compilation.BuildManager.GetType
StackTrace:
Message: System.Web.HttpException: Could not load type ' DesktopModules/GuestbookVB/ViewGuestbookVB.ascx '. at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at DotNetNuke.Framework.Reflection.CreateType(String TypeName, String CacheKey, Boolean UseCache, Boolean IgnoreErrors)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~

ModuleId: 373
ModuleDefId: 105
FriendlyName: Guestbook VB
ModuleControlSource: DesktopModules/GuestbookVB/ViewGuestbookVB.ascx
AssemblyVersion: 5.0.1
PortalID: 0
PortalName: DotNetNuke Development Site
UserID: 1
UserName: host
ActiveTabID: 55
ActiveTabName: Guestbook
RawURL: /dotnetnuke/Guestbook/tabid/55/Default.aspx
AbsoluteURL: /DotNetNuke/Default.aspx
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30618; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 1.1.4322)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 6ac39bd4-de07-4217-aa3b-137fe79dd22a
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.UI.TemplateControl.LoadControl
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException : Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.UI.TemplateControl.LoadControl(IWebObje ctFactory objectFactory, VirtualPath virtualPath, Type t, Object[] parameters) at System.Web.UI.TemplateControl.LoadControl(Type t, Object[] parameters) at DotNetNuke.UI.ControlUtilites.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl () --- End of inner exception stack trace ---

Setting a breakpoint on ViewGuestbooVB.ascx.vb produces two errors.

1. The class or CssClass is not defined
2. ResourceKey is not a valid attribute of element 'label'

Any suggestions?
  #2 (permalink)  
Old April 15th, 2009, 10:24 AM
Registered User
Points: 19, Level: 1
Points: 19, Level: 1 Points: 19, Level: 1 Points: 19, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Maifest

It appears the manifest was propagating the text box below the source dropdowns with the control source loacation proceeded by spaces.

After manually selectung the source from the source dropdown for the 3 ascx files it now works.

A manifest example in the download would have been helpful.

TIA
  #3 (permalink)  
Old April 15th, 2009, 11:34 AM
Wrox Author
 
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers Send a message via Skype™ to msellers
Default

I was not aware of any issues in the format of the manifests. The code samples are from my working development machine, I do apologize if there were spaces prior to the path of the controls.

I will try to review the download shortly.
__________________
Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

My blog for .NET and DotNetNuke info

Author of "Professional DotNetNuke Module Programming"

Tech Editor on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
  #4 (permalink)  
Old April 15th, 2009, 12:52 PM
Registered User
Points: 19, Level: 1
Points: 19, Level: 1 Points: 19, Level: 1 Points: 19, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please Check Uninstall.SqlDataProvider

Hi Mitch,

Since the manifest in the VB folder is empty, I modified the one in the CS folder and got things working.

FYI - I had accidentally added the Settings.ascx to the Guestbook VB definition resulting in duplicate control keys on that definition.

I could not recover from the error and was forced to remove the module and reinstall.

During the uninstall process there was a syntax error thrown in the Uninstall.SqlDataProvider code. Sorry, I should have saved it for you.

The final concern is the inability to approve the moderated listing. Even though I am seeing the approve and delete links, by clicking approve does not show the listing to a non-registered user.

This is occurring while logged in as Host on FireFox and not logged in on IE.

I also noticed that even though I have configured the Sign Guestbook VB settings to moderate posts, after updating the settings the checkbox tick is not being saved.

Just tryin' to learn...

TIA
  #5 (permalink)  
Old April 15th, 2009, 01:02 PM
Wrox Author
 
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers Send a message via Skype™ to msellers
Default

I will have to download the source and compare it to my local copies.

I am not sure of the issue, once you approve the items, do they disappear from the view for approval?
__________________
Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

My blog for .NET and DotNetNuke info

Author of "Professional DotNetNuke Module Programming"

Tech Editor on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
  #6 (permalink)  
Old April 15th, 2009, 01:37 PM
Registered User
Points: 19, Level: 1
Points: 19, Level: 1 Points: 19, Level: 1 Points: 19, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Response

No,

When logged in as host, by clicking approve the page just redirects.

Maybe it is not recognizing
SqlHelper.ExecuteNonQuery(ConnectionString, GetFullyQualifiedName("ApproveGuestbookEntry"), moduleId, entryId)

I can go directly to the SQL table and manually approve and delete, By doing so the results to the non- logged in user are viewable.

I can run the following script in host >> SQL

UPDATE dbo.[DNNModuleProgramming_VB_Guestbook]
SET IsApproved = 1
WHERE ModuleId = 382
AND EntryId = 2

And it works as expected.

The delete routine is also behaving the same way as described above.

If it will save you time...

If you need me to wrap up a zip of the project and send it to you - let me know
  #7 (permalink)  
Old April 16th, 2009, 10:30 AM
Wrox Author
 
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers Send a message via Skype™ to msellers
Default

My guess is that there is a translation error between the stored procedure name, and the code. I was just notified of a typo in the CS version, which had a missing p in approve.

Do you get any errors to the Event Log when you try to approve/delete an item?
__________________
Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

My blog for .NET and DotNetNuke info

Author of "Professional DotNetNuke Module Programming"

Tech Editor on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
  #8 (permalink)  
Old April 16th, 2009, 12:39 PM
Registered User
Points: 19, Level: 1
Points: 19, Level: 1 Points: 19, Level: 1 Points: 19, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default No Event Log Errors

Hi Mitch,

No, the event log is not capturing any errors.

The link URL for the delete link is http://localhost/dotnetnuke/Guestboo...1/Default.aspx

The calling page is http://localhost/dotnetnuke/Guestboo...5/Default.aspx

I have not turned on HumanFriendly formatted URLS in web.config yet to avoid any URL format issues.

I can also try deleting the module to capture the uninstall.sqldataprovider DROP syntax error that was thrown during the uninstall process.

One thing at a time.

Let me know what else I can do to help debug.

TIA
Buck
  #9 (permalink)  
Old April 19th, 2009, 12:30 PM
Wrox Author
 
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers Send a message via Skype™ to msellers
Default

Buck,

I'll try to take a look at this here either today or tomorrow. I'm not sure what the issue is, but I'll be sure to capture it ASAP. Sorry for the troubles.
__________________
Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

My blog for .NET and DotNetNuke info

Author of "Professional DotNetNuke Module Programming"

Tech Editor on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
  #10 (permalink)  
Old September 3rd, 2009, 01:38 PM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't know if this is the same problem, but the approve and delete links in the ViewGuestbook control do not work... I ran the saved procedure in VS and entered the ModuleID and ItemID from the DB table and it worked fine... when I debugged by attaching to process I noticed that the ModuleID being passed to the stored procudeure was different... the db said 437 but we were passing 435... I changed in QuickWatch and the deletion worked... debugging further I noticed the following:

when we're getting the ModuleID for deletion I get 435 from this code in the ViewGuestbook control

Code:
int oSignModuleId = int.Parse(Settings["WroxModules_Guestbook_SignModule"].ToString());
but when we add an entry I get ModuleID 437 from this code in the SignGuestbook Control

Code:
oInfo.ModuleId = this.ModuleId;
looking at the db ModuleSettings table I see this:

ModuleID SettingName SettingValue
436 WroxModules_Guestbook_SignModule 435
437 WROX_Guestbook_AllowAnon False
437 WROX_Guestbook_EnableCaptcha False
437 WROX_Guestbook_ModerateEntries False


.... I'm still trying to sort this out, but we definitely have a mismatch between the ModuleID which we use to insert into db table and the ModuleID we use to try to delete an entry
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
type load exception crazy_eye_bob Crystal Reports 4 November 7th, 2005 12:16 PM
the err of SignOut allanhu BOOK: ASP.NET Website Programming Problem-Design-Solution 3 May 3rd, 2005 09:13 PM
Err.Number -2147217873 MSUser General .NET 2 April 5th, 2004 11:54 AM
How 2 Solve ActivexComponents err amar Pro VB 6 2 December 10th, 2003 04:29 AM



All times are GMT -4. The time now is 10:04 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.