System.NullReferenceException

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
4/16/2006 7:02:23 AM
Gravatar
Total Posts 4

System.NullReferenceException

Hello!

After install on WinXp/IIS/MySQL5, I got this error and don't know why :

Thanks for help...

Erreur du serveur dans l'application '/WebSite2'.

La référence d'objet n'est pas définie à une instance d'un objet.

Description : Une exception non gérée s'est produite au moment de l'exécution de la demande Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.

Détails de l'exception: System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.

Erreur source:

Une exception non gérée s'est produite lors de l'exécution de la demande Web actuelle. Les informations relatives à l'origine et l'emplacement de l'exception peuvent être identifiées en utilisant la trace de la pile d'exception ci-dessous.
Trace de la pile:

[NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.]
mojoPortal.Web.SiteUtils.GetStyleSheetUrl() +83
mojoPortal.Web.StyleSheet.Page_Load(Object sender, EventArgs e) +19
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


Informations sur la version : Version Microsoft .NET Framework :2.0.50727.42; Version ASP.NET :2.0.50727.42
4/16/2006 8:15:33 AM
Gravatar
Total Posts 18439

Re: System.NullReferenceException

Do you have any data in the mp_Sites table?

If not try typing a space into your web.config file and save it to recyle the application so that it will try and create the default data for you.

Hope it helps.

Joe
4/16/2006 8:56:19 AM
Gravatar
Total Posts 4

Re: System.NullReferenceException


I see one line :
1, '', 'mojoPortal', 'subblue', 'mojotonguesmall.gif', '', 1, 0, 0, 0, 0, 'mojoPortal, C#, ASP.NET, mono, linux', 'A site of interest to .NET developers wanting to deploy ASP.NET on Linux', '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />', '<meta Portal="mojoPortal" Version="2.0" />', 1, 0, 0, 'PageNameWithDotASPX', 'normal', 0, 1, 1, 0, 1, '', 389, '', 'CN'

Any ideas?
4/16/2006 9:15:58 AM
Gravatar
Total Posts 18439

Re: System.NullReferenceException

Does mp_Pages also have data?
4/16/2006 9:19:57 AM
Gravatar
Total Posts 4

Re: System.NullReferenceException

mp_Pages is empty...
4/16/2006 9:40:14 AM
Gravatar
Total Posts 18439

Re: System.NullReferenceException

Try deleting the row from mp_Sites and then type a space in your web.config and save to recyle the app then try the page again in the browser.

Or even better to drop all tables then run the script to recreate them, then modify web.config so it recycles
4/16/2006 10:07:42 AM
Gravatar
Total Posts 4

Re: System.NullReferenceException

Yeah, it works!

Thanks a lot for your help!
4/16/2006 10:22:38 AM
Gravatar
Total Posts 18439

Re: System.NullReferenceException

Great!

Not sure what happened, something must have gone wrong with the initial creation of data.

Glad you're up and running!

Cheers,

Joe
You must sign in to post in the forums. This thread is closed to new posts.