MySql bug after installation and login...

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.
12/27/2008 4:24:23 AM
Gravatar
Total Posts 35
---------------- Alexei V.

MySql bug after installation and login...

I have installed mojoportal with vs2005 + sp1

it was very hard, becouse, automatic installation causes a lot of errors, so i had to create tables manually, searching for create statements inside installation files,

I remember that the first error was related with mp_bannedipaddresses table, setup was looking inside this table wich was not created yet.

any way this job was done, and there is no problem with database now.

but now I have this problem:

Could not load type 'mojoPortal.Data.SqlParameterHelper' from assembly 'mojoPortal.Data, Version=1.0.3283.21815, Culture=neutral, PublicKeyToken=null'.

  • Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  • Exception Details: System.TypeLoadException: Could not load type 'mojoPortal.Data.SqlParameterHelper' from assembly 'mojoPortal.Data, Version=1.0.3283.21815, Culture=neutral, PublicKeyToken=null'.
     

Why it asks for this Assembly if I dont use MySql ?

please tell me how to fix this bug to use, forum, blogs, calendar, etc.. becouse now only works login and simple html pages adding.

12/27/2008 6:51:20 AM
Gravatar
Total Posts 18439

Re: MySql bug after installation and login...

This error indicates that you have the MS SQL Data.dll files, not the the MySql ones. You need to download the MySql Data layer and copy the dlls to your /bin folder overwriting the ones already there.

Hope it helps,

Joe

12/27/2008 6:53:08 AM
Gravatar
Total Posts 18439

Re: MySql bug after installation and login...

If you are using the mojoportal source code with VS 2005 you need to change the data layer refreneces from teh business projects as documented here.

Hope it helps,

Joe

12/27/2008 9:09:14 AM
Gravatar
Total Posts 35
---------------- Alexei V.

Re: MySql bug after installation and login...

Great!

I followed your indications and it worked

but now, I tried to recreate database, i just executed scripts from 2CreateTables.sql

inside a new database, and I have pointed to this new database my mojoPortal with (in .config files)

and now i get this error: 

An Error Occurred:Object reference not set to an instance of an object.
Source:mojoPortal.Web
Stack Trace at mojoPortal.Web.SiteUtils.GetRoleCookieName(SiteSettings siteSettings) at mojoPortal.Web.mojoRoleProvider.GetRolesForUser(String userName) at System.Web.Security.RolePrincipal.IsInRole(String role) at mojoPortal.Business.WebHelpers.WebUser.IsInRole(String role) at mojoPortal.Business.WebHelpers.WebUser.get_IsAdmin() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

any suggestions ?

12/27/2008 9:16:15 AM
Gravatar
Total Posts 18439

Re: MySql bug after installation and login...

You should not run any scripts manually. Those are old legacy scripts only needed for upgrading very old versions.

Just build solution, create an empty db, set connection string to new db and visit /Setup/Default.aspx and all the needed scripts run automatically.

Hope it helps,

Joe

12/27/2008 11:38:40 AM
Gravatar
Total Posts 35
---------------- Alexei V.

Re: MySql bug after installation and login...

I created new database, and i set web.config to point it. but I still get same problem.

 An Error Occurred:Object reference not set to an instance of an object.
Source:mojoPortal.Web
Stack Trace at mojoPortal.Web.SiteUtils.GetRoleCookieName(SiteSettings siteSettings) at mojoPortal.Web.mojoRoleProvider.GetRolesForUser(String userName) at System.Web.Security.RolePrincipal.IsInRole(String role) at mojoPortal.Business.WebHelpers.WebUser.IsInRole(String role) at mojoPortal.Business.WebHelpers.WebUser.get_IsAdmin() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Then I returned to my previously created database and I try to open mojoPortal, it works fine at load homepage, login, user pages...

but

if i go to forum, i get this message:

 

Unable to convert MySQL date/time value to System.DateTime
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: MySql.Data.Types.MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime

Source Error:


Line 53: </td>
Line 54: <td headers='<%# Resources.ForumResources.ForumModulePostLastPostLabel %>'>
Line 55: <%# DateTimeHelper.GetTimeZoneAdjustedDateTimeString(((System.Data.Common.DbDataRecord)Container.DataItem),"MostRecentPostDate", TimeOffset) %>
Line 56: </td>
Line 57: </tr>

Source File: g:\mssqlreleasefiles\wwwroot\Forums\ForumModule.ascx Line: 55
 

 

12/27/2008 11:45:08 AM
Gravatar
Total Posts 18439

Re: MySql bug after installation and login...

Any database where you ran the 1createtables.sql is NOT going to be correct.

Most likely problem if you are getting errors during the automated install is because you are using MySql 5.1 which has major bugs. If you uninstall it and install MySql 5.0 it will work fine.

Hope it helps,

Joe

12/27/2008 12:05:08 PM
Gravatar
Total Posts 35
---------------- Alexei V.

Re: MySql bug after installation and login...

Followed your advice i did not execute any script manually, I only created empty database, but i get the same error.

my Sql version still:

did5.0.51b-community-nt
MySQL Community Edition (GPL)

Win32

12/27/2008 12:20:35 PM
Gravatar
Total Posts 18439

Re: MySql bug after installation and login...

Hopefully you did not use the same db name as the file may still live on disk from the 5.1 installation.

Did you set your connection string to the new empty db?

Did you visit /Setup/Default.aspx again after creating a new db?

Did it run the scripts with no error?

What is the error now and what steps to produce the error?

This site is running on MySql on windows with no problems and my local machine it works with no problems.

12/27/2008 12:30:42 PM
Gravatar
Total Posts 35
---------------- Alexei V.

Re: MySql bug after installation and login...

no, I created new database named mojo2, i never did use a name like that, I succesfull connected my self with mojouser login/pwd

then i hit run. as always in visual studio to launch webSite and i see automaticly this page:

http://localhost:1306/wwwroot/Setup/Default.aspx

 

An Error Occurred:Object reference not set to an instance of an object.
Source:mojoPortal.Web
Stack Trace at mojoPortal.Web.SiteUtils.GetRoleCookieName(SiteSettings siteSettings) at mojoPortal.Web.mojoRoleProvider.GetRolesForUser(String userName) at System.Web.Security.RolePrincipal.IsInRole(String role) at mojoPortal.Business.WebHelpers.WebUser.IsInRole(String role) at mojoPortal.Business.WebHelpers.WebUser.get_IsAdmin() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

12/27/2008 12:32:12 PM
Gravatar
Total Posts 35
---------------- Alexei V.

Re: MySql bug after installation and login...

I made it work, but creating tables by my self, with other "database name" wich i still have.

so, i know the portal is works fine, it just the problem is that: i cant get it work with empty db.

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