November Happy Hour will be moved to Thursday December 5th.

NullrefenceException problem

Vote:
 

Hi,

I got a strange problem here (or maybe not).

I have a site, working fine locally in my machine, but when I published it, first it says can not find the pay, then when I tried to login as admin, I got this error:

[NullReferenceException: Object reference not set to an instance of an object.]
   EPiServer.Web.WebControls.MenuList.CreateChildControls() +288
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171

......

So, it seems there's problem with the MenuList? then I manually removed the Menulist code, I can see the site, but everything is messed up. and when I logged in, the right click menu doesn't show up, I can't go to the editor or admin mode.

Anyone had this problem before? how can I fix it, the thing is the code works fine locally but not when I published on a live server.  and the Episerver:Menulist is inside an ascx, no coldbehind,  very simple like this '

<EPiServer:MenuList ID="MenuL" PageLink="8" runat="server">.....

'

 So what might be the problem? how come it works locally but not on a server? actually, I published the site on my local machine, it works, but not a live one. did I screw up with the publishing? or is there anything missing on the server?

Thank u guys so much for answering.

Have a nice day!

 

#28008
Feb 17, 2009 12:18
Vote:
 

Hi Lei,
Please check all the proerties are available in the other environment(exclucing local)

Could you please send the code snippet , it will help us to figure out the problem.

#28037
Feb 18, 2009 5:47
Vote:
 

This is a very late answer - but just in case anyone else gets this problem...

The likely cause is the page containing this control has the wrong base class. It should inherit from EPiServer.TemplatePage.

#46325
Dec 07, 2010 13:44
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.