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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom Module -Critical ErrorCustom Module -Critical Error
Previous
 
Next
New Post
7/26/2012 4:14 PM
 

Help I'm stuck. My first module: A critical error has occurred. Object reference not set to an instance of an object.

Any suggestions?

AssemblyVersion: 6.2.0

PortalID: 0

PortalName: CSCDNN

UserID: 1

UserName: host

ActiveTabID: 82

ActiveTabName: Test Page

RawURL: /TestPage.aspx

AbsoluteURL: /Default.aspx

AbsoluteURLReferrer: http://localhost/Admin/LogViewer.aspx

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider

ExceptionGUID: f36791e5-db89-4062-89bb-1fe07750ec78

InnerException: Object reference not set to an instance of an object.

FileName:

FileLineNumber: 0

FileColumnNumber: 0

Method: DotNetNuke.Web.DDRMenu.DDRMenuControl.OnPreRender

StackTrace:

Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Web.DDRMenu.DDRMenuControl.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

Source:

Server Name: jfrick


 
New Post
7/26/2012 8:12 PM
 
Did you use my module development templates to create the module?

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
7/27/2012 7:56 AM
 

Hi Chris,

No I did not. I'm experimenting with OData, WCF, DataService and Knockout. I followed this to get my DS working: Deploying OData Services using IIS & SQL Server. I will try your template.

Thanks,

Jeff

 
New Post
7/29/2012 1:40 AM
 
To build custom modules in DNN you need to follow a set of pretty specific steps to get the module setup to function as part of the DNN framework. The templates made by Chris represent possibly the best place to start.

Get the module framework functional first - with a simple hello world type message or some such then advance from there to add new features.

Now having said this - trying to Deploy something based on the notes in your link regarding OData simply will not work in the way that is outlined in that document if you try to flow all the steps they outlined.

DNN is already a web application - so you would need to work differently - as the steps outlined would wreak havoc with the existing dnn framework as they currently stand.

Westa
 
New Post
7/30/2012 8:21 AM
 

Thanks Wes, 

I appreciate the information. I was following Steve Fabian's blog and using his template and had a directory working very well for our in-house intranet. I was using WCF along with jQuery, OData and KnockoutJS. It was working great! While trying to improve upon this I tried applying a multiview approach. It stopped working and I haven't been able to get it working since. Even restoring from previous versions hasn't helped. The data service call no longer works:http://localhost/DesktopModules/Emplo... I have tried working with the DNN web.config connection path, the edmx data mode and the data service code behind:

using System;

using System.Collections.Generic;
using System.Data.Services;
using System.Data.Services.Common;
using System.Linq;
using System.ServiceModel.Web;
using System.Web;

namespace Employees.Service
{
    public class EmployeeDataService : DataService< Data.EmployeesContainer >
    {
        // This method is called only once to initialize service-wide policies.
        public static void InitializeService(DataServiceConfiguration config)
        {
            // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
            // Examples:
            // config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
            // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
            config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
        }
    }
}


Thanks,

Jeff

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom Module -Critical ErrorCustom Module -Critical Error


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