Error when I try to use blog or forum

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

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.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
6/25/2008 5:30:16 AM
Gravatar
Total Posts 12

Error when I try to use blog or forum

Hi, I'm in the process of evaluating Graffiti CMS and Mojoportal, of which I really like Mojoportal the best, but when I add a blog post or try to add a forum I get the following error:
"We're sorry but a server error has occurred while trying to process your request. The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.".
 

Adding html-pages works ok.
Adding a blog works, until I'm adding a post to it.

I'm using medium trust in a hosted environment, and MySql.
I have done nothing but a fresh install, and adding a top page/menu and renamed the site.
I have followed your suggestions in the article "Quick Fix for Medium Trust".
I did not download the source files, but the other (Distribution files?) ones.
I  downloaded the mysql files and added them to the bin-directory.

Could it be related to the following:
<add key="Lucene.Net.lockdir" value="E:\CustomerData\webspaces\webspace_00108785\wwwroot\storkenkommer.se\Data\Sites\2\index"/>
If I go to the file manager in mojoportal, this is the path I get.
I also tried "\Data\Sites\2\index"
I'm only using one site, and havo no clue to why it is in the "\sites\2"-path.

The system info:
mojoPortal Version 2.2.5.8 MySQL

The log:
2008-06-25 12:01:56,140 [20400] ERROR mojoPortal.Web.mojoBasePage [(null)] - 213.185.29.243-sv-SE - /blog.aspx
MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated.
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBBlog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Business.Blog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Web.BlogUI.BlogModule.PopulateNavigation()
at mojoPortal.Web.BlogUI.BlogModule.PopulateControls()
at mojoPortal.Web.BlogUI.BlogModule.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2008-06-25 12:01:56,156 [20400] ERROR mojoPortal.Web.Global [(null)] - 213.185.29.243-sv-SE - /blog.aspx
MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated.
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBBlog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Business.Blog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Web.BlogUI.BlogModule.PopulateNavigation()
at mojoPortal.Web.BlogUI.BlogModule.PopulateControls()
at mojoPortal.Web.BlogUI.BlogModule.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

6/25/2008 7:09:06 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

Hi,

For MySql to work in medium trust the host must have the MySql Connector for .NET installed in the GAC. Perahps the version they have in the GAC has bugs. When I google this error "MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated" I find a lot of results, looking at a few of them it looks like maybe a bug in particualr versions of the Connector. I've only looked at a few of the results though so maybe further looking will find more answers.

The fact that its using /Data/Sites/2 instead of Data/Sites/1 is strange and makes me think some errors happened during setup or something. I would look in the mp_Sites table and check if the SiteID is 2, then it should be ok to have /Data/Sites/2, but makes me wonder what happened to Site 1.

If you haven't entered a lot of content yet, one option is to drop all tables from the db and visit setup/Default.aspx again and it will re-create the initial tables and data and you should be back at Site 1 and using /Data/Sites/1

Nothing in your error makes me think its a lucene issue or medium trust as those typically manifest as security exceptions.

Hope it helps,

Joe

6/25/2008 10:43:21 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Wow, that was quick. Thanks. I guess you guys never sleeps :-)

I have reinstalled it several times with no result. I also re-deployed all files and did a clean setup. The error is still there and it still uses site 2.
The id in mp_Sites is 2 though.

I will contact my host about mySql. Thanks again!

6/26/2008 12:11:56 PM
Gravatar
Total Posts 36
Anchorage, Alaska

Re: Error when I try to use blog or forum

On the MySql download page, the default connector is 5.1.  There are some exceptions thrown when using more than one MySql connection.  When I did testing, I could open a connection, do my task, close the connection.  Then, create another connection, do my task, close the connection, etc.  When the test app close, it throw an exception.

I upgraded to version 5.2 connector and everything works great.

6/26/2008 4:11:43 PM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Oops, big mistake: I forgot to mention that my host only provides mySql 4. Can this be it?

6/27/2008 5:42:46 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

I don't know if the version of MySql is a factor. If I were you I would google for "MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated" and study the results for possible causes to figure out the most likely actual cause.

Hope it helps,

Joe

6/27/2008 7:02:03 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

another thing I'm wondering about. In several places it is said you have to have sharpziplib.dll in your bin folder if using mySql.

Is this correct?

I cannot find the file anywhere.

6/27/2008 7:33:27 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

No, that was needed in older version of the MySql connector but not in newer ones. Since you are running in Medium Trust, the MySql.Data.dll in the bin folder is probably not being used and you could even probably delete it. Instead its using whatever version of this they have the GAC on the hosted machine.

6/27/2008 11:31:40 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Thanks for your great support. I'll go on vacation to the french riviera, so I hope my host have given me some response to the questions I've sent them when I come back.

8/20/2008 6:22:31 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Back from vacation and numerous attemts of getting my host to react. Still nothing.

I tried to update to the new version 2.2.6.8 though, hoping it would fix anything broken.

Who known? It gets a new error with the mysql connector: Could not load file or assembly 'MySql.Data, Version=5.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies

The same message on my local machine as on the host.

Is it because I'm running MySql 4?

Best regards...

 

 

8/20/2008 6:28:21 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

No, the error is talking about MySql.Data.dll, not your version of the database. Did you get the files from the mojopoportal-2-2-6-8-mysqldatalayer.zip?

In medium trust its probably using the MySql.Data.dll from the GAC that was installed by the host and that one may not be the expected version.

If it were me I'd stay away from trying to use MySql in Medium Trust and use MS SQL instead or move to full trust hosting.

Best,

Joe

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