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.0Module Problems - 4.3.5, StarterKit, VS2005 (not Express), XP HomeModule Problems - 4.3.5, StarterKit, VS2005 (not Express), XP Home
Previous
 
Next
New Post
10/27/2006 2:46 PM
 

I am a DNN Newbie but very experienced (i.e. old) software development geek.

DotNetNuke 4.3.5

Visual Studio 2005 - I have the full version and not the Express Version

My development machine is Windows XP Home

Module works fine when logged in as host or admin.  Generates an error message when not logged in.

I simply created a new module and renamed the directories and tried to install it per default instructions.  The exception I get is:

ModuleId: 369
ModuleDefId: 127
FriendlyName: JATFirst
ModuleControlSource: DesktopModules/JATFirst/ViewJATFirst.ascx
AssemblyVersion: 04.03.05
PortalID: 0
PortalName: My Website
UserID: -1
UserName:
ActiveTabID: 53
ActiveTabName: JAThomas Module Tester
RawURL: /JATDNN/JAThomasModuleTester/tabid/53/Default.aspx
AbsoluteURL: /JATDNN/Default.aspx
AbsoluteURLReferrer: http://localhost:1847/JATDNN/JAThomasModuleTester/tabid/53/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: a249429c-98c6-4b05-ab54-24bf47f2745d
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: YourCompany.Modules.JATFirst.ViewJATFirst.lstContent_ItemDataBound
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 YourCompany.Modules.JATFirst.ViewJATFirst.lstContent_ItemDataBound(Object sender, DataListItemEventArgs e) at System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e) at System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) at System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.BaseDataList.DataBind() at YourCompany.Modules.JATFirst.ViewJATFirst.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---
Source:
Server Name: JATHOMASKACHP

I've searched the boards and the web and it seems that module development has changed quite dramatically recently and I haven't been able to find a problem quite like mine.

Any Suggestions?

Keith

 
New Post
10/28/2006 12:15 PM
 
You need to explicitly turn off caching for your module.  Both in the module definition and the instance of the module on the page.
 
New Post
10/28/2006 1:13 PM
 

Here is the method.  This is strictly boiler plate from the Starter Kit.  I didn't write a line of this....

I will try the caching and see if that works.

Thanks,

Keith

 

Protected Sub lstContent_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles lstContent.ItemDataBound

Dim strContent As String = strTemplate

Dim strValue As String

' add content to template

Dim objProperties As ArrayList = Common.Utilities.CBO.GetPropertyInfo(GetType(JATFirstInfo))

Dim intProperty As Integer

Dim objPropertyInfo As PropertyInfo

For intProperty = 0 To objProperties.Count - 1

objPropertyInfo = CType(objProperties(intProperty), PropertyInfo)

If strContent.IndexOf("[" & objPropertyInfo.Name.ToUpper & "]") <> -1 Then

strValue = Server.HtmlDecode(DataBinder.Eval(e.Item.DataItem, objPropertyInfo.Name).ToString())

strContent = strContent.Replace("[" & objPropertyInfo.Name.ToUpper & "]", strValue)

End If

Next intProperty

' assign the content

Dim lblContent As Label = CType(e.Item.FindControl("lblContent"), Label)

lblContent.Text = strContent

End Sub

 
New Post
10/28/2006 4:11 PM
 

Turning of Caching worked!  Thanks,

Now the question is why?

 

Keith

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Problems - 4.3.5, StarterKit, VS2005 (not Express), XP HomeModule Problems - 4.3.5, StarterKit, VS2005 (not Express), XP Home


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