Mono Cannot cast from source type to destination type. and Object reference not set to an instance

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/25/2009 4:17:10 PM
Gravatar
Total Posts 1

Mono Cannot cast from source type to destination type. and Object reference not set to an instance

Running Plex 9.0.1 -- CentOS 5 - Linux 2.6.18-028stab060.8
MySQL database 5.0.45
Mono 2.4
mojoPortal 2.3.0.1
Ok so I've tired two things now and still no luck. I figure I'll post this here while I try something else... By the way the xsp tests seemed to work just fine.

First try:
Wget of mojoportal-2-3-0-1-pgsqlreleasefiles-for-mono.zip and mojoportal-2-3-0-1-mysqldatalayer-GPL.zip. Unziped to a private directory. Changed the Web.config file to reflect the mysql settings. Moved the sql files over. Copied the wwwroot to the httpdocs dir. Chowned the Data dir for the apache user and group. Browsed to the setup page. Fix an error in the database username, etc. Finally get passed setup. Site works or so I think. Hit what looks to be the known issue with changing the password. Use Workaround (WA) and get passed that hurtle.. Cool. So I go to add a blog to the main page. After I submit the change I get sent to an error page (Actually a non-existant page) think ok wierd browse to the main site again greeted by the error page. Make it over to the error log (stupid me didnt save the first error, complaints about some null reference.) Was able to browse back and remove the blog, everything is cool. Added links no problem. Try to add something else(stats?) and get the same error again.  The error log below is sometime when I remembered to save it... Get frustrated delete everything and try step 2 below.

2009-04-25 18:27:06,659 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Admin/PageLayout.aspx?pageid=1
System.NullReferenceException: Object reference not set to an instance of an object
at mojoPortal.Web.AdminUI.PageLayout.btnCreateNewContent_Click (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.WebControls.Button.OnClick (System.EventArgs e) [0x00000]
at System.Web.UI.WebControls.Button.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvents () [0x00000]
at System.Web.UI.Page.ProcessRaiseEvents () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:27:06,736 ERROR mojoPortal.Web.Global - 84.110.242.21-en-US - /Admin/PageLayout.aspx?pageid=1
System.NullReferenceException: Object reference not set to an instance of an object
at mojoPortal.Web.AdminUI.PageLayout.btnCreateNewContent_Click (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.WebControls.Button.OnClick (System.EventArgs e) [0x00000]
at System.Web.UI.WebControls.Button.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvents () [0x00000]
at System.Web.UI.Page.ProcessRaiseEvents () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:30:55,127 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Default.aspx
System.MissingFieldException: Field 'mojoPortal.Web.BlogUI.BlogModule.updBlog' not found.
at ASP.blog_blogmodule_ascx.__BuildControlTree (ASP.blog_blogmodule_ascx __ctrl) [0x00000]
at ASP.blog_blogmodule_ascx.FrameworkInitialize () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControlInternal () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControl (System.Web.UI.Page page) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.Type type, System.Object[] parameters) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.String virtualPath) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:30:55,130 ERROR mojoPortal.Web.Global - 84.110.242.21-en-US - /Default.aspx
System.MissingFieldException: Field 'mojoPortal.Web.BlogUI.BlogModule.updBlog' not found.
at ASP.blog_blogmodule_ascx.__BuildControlTree (ASP.blog_blogmodule_ascx __ctrl) [0x00000]
at ASP.blog_blogmodule_ascx.FrameworkInitialize () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControlInternal () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControl (System.Web.UI.Page page) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.Type type, System.Object[] parameters) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.String virtualPath) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:33:49,034 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Default.aspx
System.MissingFieldException: Field 'mojoPortal.Web.BlogUI.BlogModule.updBlog' not found.
at ASP.blog_blogmodule_ascx.__BuildControlTree (ASP.blog_blogmodule_ascx __ctrl) [0x00000]
at ASP.blog_blogmodule_ascx.FrameworkInitialize () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControlInternal () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControl (System.Web.UI.Page page) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.Type type, System.Object[] parameters) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.String virtualPath) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:33:49,037 ERROR mojoPortal.Web.Global - 84.110.242.21-en-US - /Default.aspx
System.MissingFieldException: Field 'mojoPortal.Web.BlogUI.BlogModule.updBlog' not found.
at ASP.blog_blogmodule_ascx.__BuildControlTree (ASP.blog_blogmodule_ascx __ctrl) [0x00000]
at ASP.blog_blogmodule_ascx.FrameworkInitialize () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControlInternal () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControl (System.Web.UI.Page page) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.Type type, System.Object[] parameters) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.String virtualPath) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:34:01,323 INFO mojoPortal.Web.Global - Global.asax.cs Application_End
2009-04-25 18:34:29,455 INFO mojoPortal.Web.Global - Application Started.
2009-04-25 18:34:48,118 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Default.aspx
System.MissingFieldException: Field 'mojoPortal.Web.BlogUI.BlogModule.updBlog' not found.
at ASP.blog_blogmodule_ascx.__BuildControlTree (ASP.blog_blogmodule_ascx __ctrl) [0x00000]
at ASP.blog_blogmodule_ascx.FrameworkInitialize () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControlInternal () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControl (System.Web.UI.Page page) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.Type type, System.Object[] parameters) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.String virtualPath) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:34:48,128 ERROR mojoPortal.Web.Global - 84.110.242.21-en-US - /Default.aspx
System.MissingFieldException: Field 'mojoPortal.Web.BlogUI.BlogModule.updBlog' not found.
at ASP.blog_blogmodule_ascx.__BuildControlTree (ASP.blog_blogmodule_ascx __ctrl) [0x00000]
at ASP.blog_blogmodule_ascx.FrameworkInitialize () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControlInternal () [0x00000]
at System.Web.UI.UserControl.InitializeAsUserControl (System.Web.UI.Page page) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.Type type, System.Object[] parameters) [0x00000]
at System.Web.UI.TemplateControl.LoadControl (System.String virtualPath) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:35:30,806 INFO mojoPortal.Business.WebHelpers.IndexHelper - IndexHelper.RebuildPageIndex - Home
2009-04-25 18:35:30,808 ERROR mojoPortal.Business.WebHelpers.IndexBuilderManager - System.Configuration.Provider.ProviderException: No IndexBuilderProvider found.
at mojoPortal.Business.WebHelpers.IndexBuilderManager.Initialize () [0x00000]
2009-04-25 18:35:30,813 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Admin/PageLayout.aspx?pageid=1
System.NullReferenceException: Object reference not set to an instance of an object
at mojoPortal.Web.AdminUI.PageLayout.DeleteBtn_Click (System.Object sender, System.Web.UI.ImageClickEventArgs e) [0x00000]
at System.Web.UI.WebControls.ImageButton.OnClick (System.Web.UI.ImageClickEventArgs e) [0x00000]
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvents () [0x00000]
at System.Web.UI.Page.ProcessRaiseEvents () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 18:35:30,820 ERROR mojoPortal.Web.Global - 84.110.242.21-en-US - /Admin/PageLayout.aspx?pageid=1
System.NullReferenceException: Object reference not set to an instance of an object
at mojoPortal.Web.AdminUI.PageLayout.DeleteBtn_Click (System.Object sender, System.Web.UI.ImageClickEventArgs e) [0x00000]
at System.Web.UI.WebControls.ImageButton.OnClick (System.Web.UI.ImageClickEventArgs e) [0x00000]
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, System.String eventArgument) [0x00000]
at System.Web.UI.Page.RaisePostBackEvents () [0x00000]
at System.Web.UI.Page.ProcessRaiseEvents () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
 

Second try: (I also see similar behavior on the VMWare mono image, though I didnt configure the server so maybe its something different.)
Removed all sql entries... Removed all files from root of httpdocs... cleaned out the /tmp dir... restarted apache, the server, mysql, mono, etc.
Ok after this I downloaded mojoportal-2-3-0-1-pgsqlreleasefiles-for-mono.zip and mojoportal-2-3-0-1-mysqldatalayer-GPL.zip. I unzipped both onto my windows system and edited the Web.config.mono and user.config file to reflect the MYSQL database settings, then change the Web.mono.Config to Web.config. I also move the mysqldata layer in place. I then zipped up the wwwroot directory and ftp it to my server. There I unzipped it, chowned the Data directory to the apache user and group. After this I went the the site/Setup/Default.aspx everything seemed to work fine no error messages, etc. Browsed to the Default.aspx file and was greeted with the server error window, game over. Lucky the first time I had something working... Browsed to Admin/ServerLog.aspx since I knew it was there. Logged in.. Got the error messages:

2009-04-25 23:28:36,155 INFO mojoPortal.Web.Global - Application Started.
2009-04-25 23:28:36,271 ERROR mojoPortal.Web.WebTaskManager - MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_TaskQueue' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:36,401 ERROR mojoPortal.Web.BannedIPBlockingHttpModule - handled exception:
MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_BannedIPAddresses' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:37,827 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_SiteHosts' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:44,430 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_SiteHosts' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:44,437 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_SiteHosts' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:44,450 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_SiteHosts' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:44,452 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Default.aspx
System.NullReferenceException: Object reference not set to an instance of an object
at mojoPortal.Web.mojoBasePage.OnInit (System.EventArgs e) [0x00000]
at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 23:28:44,453 INFO mojoPortal.Web.mojoBasePage - no sites or no database found in application error so try to redirect to Setup Page
2009-04-25 23:28:48,388 ERROR mojoPortal.Web.BannedIPBlockingHttpModule - handled exception:
MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_BannedIPAddresses' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:48,389 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_SiteHosts' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:48,390 ERROR mojoPortal.Web.UrlRewriter - System.NullReferenceException: Object reference not set to an instance of an object
at mojoPortal.Web.UrlRewriter.GetRedirectUrl (System.String targetUrl) [0x00000]
at mojoPortal.Web.UrlRewriter.RewriteUrl (System.Web.HttpApplication app) [0x00000]
2009-04-25 23:28:48,405 ERROR mojoPortal.Web.UrlRewriter - MySql.Data.MySqlClient.MySqlException: Table 'jeff_jeffeggy_mojo.mp_FriendlyUrls' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
2009-04-25 23:28:51,952 INFO mojoPortal.Business.SiteSettings - SiteSettings expandoProperties was null so nothing was saved
2009-04-25 23:29:00,869 INFO mojoPortal.Business.WebHelpers.IndexHelper - Rebuilding Search index.
2009-04-25 23:29:00,872 INFO mojoPortal.Features.BlogIndexBuilderProvider - BlogIndexBuilderProvider indexing page - Home
2009-04-25 23:29:00,882 INFO mojoPortal.Features.CalendarEventIndexBuilderProvider - CalendarEventIndexBuilderProvider indexing page - Home
2009-04-25 23:29:00,887 INFO mojoPortal.Features.GalleryImageIndexBuilderProvider - GalleryImageIndexBuilderProvider indexing page - Home
2009-04-25 23:29:00,892 INFO mojoPortal.Business.WebHelpers.HtmlContentIndexBuilderProvider - HtmlContentIndexBuilderProvider indexing page - Home
2009-04-25 23:29:00,942 INFO mojoPortal.Features.LinksIndexBuilderProvider - LinksIndexBuilderProvider indexing page - Home
2009-04-25 23:29:00,946 INFO mojoPortal.Features.SharedFilesIndexBuilderProvider - SharedFilesIndexBuilderProvider indexing page - Home
2009-04-25 23:29:00,953 INFO WebStore.UI.Helpers.ProductSearchIndexBuilder - ProductSearchIndexBuilder indexing page - Home
2009-04-25 23:29:00,956 INFO mojoPortal.Business.WebHelpers.IndexHelper - Finished indexing main features.
2009-04-25 23:29:00,958 INFO mojoPortal.Features.ForumThreadIndexBuilderProvider - ForumThreadIndexBuilderProvider indexing page - Home
2009-04-25 23:29:00,961 INFO mojoPortal.Business.WebHelpers.IndexHelper - Finished indexing Forums.
2009-04-25 23:29:14,775 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Default.aspx
System.InvalidCastException: Cannot cast from source type to destination type.
at mojoPortal.Web.SiteModuleControl.OnInit (System.EventArgs e) [0x00000]
at mojoPortal.Web.ContentUI.HtmlModule.OnInit (System.EventArgs e) [0x00000]
at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000]
at System.Web.UI.Control.AddedControl (System.Web.UI.Control control, Int32 index) [0x00000]
at System.Web.UI.ControlCollection.Add (System.Web.UI.Control child) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 23:29:14,780 ERROR mojoPortal.Web.Global - 84.110.242.21-en-US - /Default.aspx
System.InvalidCastException: Cannot cast from source type to destination type.
at mojoPortal.Web.SiteModuleControl.OnInit (System.EventArgs e) [0x00000]
at mojoPortal.Web.ContentUI.HtmlModule.OnInit (System.EventArgs e) [0x00000]
at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000]
at System.Web.UI.Control.AddedControl (System.Web.UI.Control control, Int32 index) [0x00000]
at System.Web.UI.ControlCollection.Add (System.Web.UI.Control child) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 23:37:16,608 ERROR mojoPortal.Web.mojoBasePage - 84.110.242.21-en-US - /Default.aspx
System.InvalidCastException: Cannot cast from source type to destination type.
at mojoPortal.Web.SiteModuleControl.OnInit (System.EventArgs e) [0x00000]
at mojoPortal.Web.ContentUI.HtmlModule.OnInit (System.EventArgs e) [0x00000]
at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000]
at System.Web.UI.Control.AddedControl (System.Web.UI.Control control, Int32 index) [0x00000]
at System.Web.UI.ControlCollection.Add (System.Web.UI.Control child) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
2009-04-25 23:37:16,610 ERROR mojoPortal.Web.Global - 84.110.242.21-en-US - /Default.aspx
System.InvalidCastException: Cannot cast from source type to destination type.
at mojoPortal.Web.SiteModuleControl.OnInit (System.EventArgs e) [0x00000]
at mojoPortal.Web.ContentUI.HtmlModule.OnInit (System.EventArgs e) [0x00000]
at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000]
at System.Web.UI.Control.AddedControl (System.Web.UI.Control control, Int32 index) [0x00000]
at System.Web.UI.ControlCollection.Add (System.Web.UI.Control child) [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage () [0x00000]
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Page.ProcessLoad () [0x00000]
at System.Web.UI.Page.ProcessPostData () [0x00000]
at System.Web.UI.Page.InternalProcessRequest () [0x00000]
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000]
 

 

I dont know why its complaing about those tables in the beginning. I checked they are there.

I also tried to build the tip of the trunk in monodevelope. It complained about the Timezone class not being able to be found. Commented all references out. Gave some other error about a missing file .generate file (gave up as this is another day).

So for step 3 I have something else I'll try.
Step 4 build in VS 2008 (more comfortable here as this is what I use pretty much all day at work.) I will follow your build instructions using Unleash it.

Any help is welso

4/26/2009 6:31:35 AM
Gravatar
Total Posts 18439

Re: Mono Cannot cast from source type to destination type. and Object reference not set to an insta

Hi Jeff,

I admit I have not tested using mod_mono in quite a while. I generally test with xsp2. I'm kind of busy with project work right now so I don't really have time at the moment to setup mod_mono and confirm the issues but it seems like Mono bugs. If you get different results under mod_mono than under xsp2 then I would definitely report that as a bug in the Mono bugzilla. I think the password issue still needs to be reported too if its still there in 2.4.

As far as errors in the log about missing tables, you will always see those errors after a new install because at first those tables don't exist, the error is logged but handled and then redirect to the /Setup/Default.aspx page runs the scripts to create the tables.

I'm not sure that using the Web.mono.config file is needed anymore, the primary difference is the use of 1.0 AJAX in the Web.mono.config vs use of 3.5 in the normal Web.config. Lately I have not been changing to the Web.mono.config file when I test, I just use the normal Web.config as the project references in our MonoDevelop solution now use 3.5 AJAX (System.Web.Extensions).

As far as compiling on Windows, I'm not sure thats going to work, you can try using the compiler directive  MONO but I still think it may not work. I always compile the -for-mono release on Linux using MonoDevelop. Our MonoDevelop solution leaves out some files and adds some files not in the vs solution for compatibility. Some things like WebParts are not implemented in Mono and that stuff is left out.

I test primarily against Mono built from svn and I get the mojoportal code from our svn and open the mojoportal.mds (MonoDevelop Solution) and build that then test with xsp2. When I get some time I will setup mod_mono again.

Best,

Joe

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