Installed source but VS2005 could bring up the site until I ran it directly from IE

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.
2/1/2007 10:42:06 PM
Gravatar
Total Posts 2
Moncef

Installed source but VS2005 could bring up the site until I ran it directly from IE

This is my first install of Mojoportal. I have downloaded the source as I am trying to use Mojoportal as a base that I can customize for some of my customers. I was able to get the site up and running but not the way I expected. I expected that I would be able to run bring it up from within VS2005 the first time but I kept getting the following the error that I am adding at the end of my message. So I exited VS2005 and used invoked http://localhost/mojoportal directly in IE and it ran. I then went back in VS2005 and was able to bring the site up. I was wondering why this behavior?

Thanks.

------------------------------------------------------------------------
System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="mojoPortal.Web"
StackTrace:
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load(Object sender, EventArgs e) in D:\Projects\Learning\CMS\mojoportal\Web\Default.aspx.cs:line 80
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2/2/2007 8:20:19 AM
Gravatar
Total Posts 18439

Re: Installed source but VS2005 could bring up the site until I ran it directly from IE

Hi Moncef,

Heres what I think happened. That null reference occurred trying to create the CurrentPage object because there was no data for sites and pages in the database.

When you launched the debugger in VS 2005 it hit that error and when it did you stopped the execution.

When you opened the browser and ran the site under IIS, it hit the same error but since you were not debugging and did not stop execution it went to the global error handler in global.asax.cs. In that handler it checks if there is no data and if not it directs you to the setup page where you can click the button to create initial data. If you had just let it continue execution in VS after it hit that error it would have done the same thing.

I am glad you posted this as its probable that other developers encounter this and also stop the debugger when it hits that error not knowing that the error would be handled if they just let it run.

I'm going to put a check before that errror occurs to see if the CurrentPage is null and if there is no site data and if so redirect to the setup page without letting that error happen.

Thanks,

Joe
2/2/2007 8:51:23 AM
Gravatar
Total Posts 2
Moncef

Re: Installed source but VS2005 could bring up the site until I ran it directly from IE

Thanks. I appreciate the quick response.
You must sign in to post in the forums. This thread is closed to new posts.