mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

mojoPortal is no longer supported on mono. This forum is here for archival purposes.

This thread is closed to new posts. You must sign in to post in the forums.
1/17/2009 5:55:46 AM
Gravatar
Total Posts 44

mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

mojoPortal work like a charmwith mono 2.2 now, except a few bugs.

I made a big mistake, when i installed mono on my new webserver. - I am telling you this, because i don't want you to du the same mistake again.

I messed a bit around with the source-packages, and the daily build stuff. so i got some kind of a mixed system.

To get a working mono-2.2 on debian, you can take all packages from their source-download site

http://ftp.novell.com/pub/mono/sources-stable/

First i compiled mono-2.2, after that xsp, mod_mono and finally libgdiplus.

After that i got a working mono-2.2.

I had to set up apache2 with a vhost like this:

#NameVirtualHost 123.123.123.123:80

<VirtualHost *:80>
DocumentRoot /home/yourdomain/wwwroot/
ServerName www.yourdomain.com
ServerAlias yourdomain.com

ErrorLog /home/yourdomain/log/myaspx_error.log
LogLevel error
TransferLog /home/yourdomain/log/myaspx_access.log

# Mono stugg
MonoPath default "/usr/local/lib/mono/2.0"
MonoServerPath default /usr/local/bin/mod-mono-server2
AddMonoApplications default "/:/home/yourdomain/wwwroot"

<location />
MonoSetServerAlias default
SetHandler mono
</location>

<Directory /home/yourdomain/wwwroot/>
<FilesMatch "\.(gif|jp?g|png|css|ico|xsl|wmv)$">
SetHandler None
</FilesMatch>

Options Indexes
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
 

I hope this simplies it a bit, if it is your first time doing vhosts  on apache2....

Note: I am in general a windows user, so my knowledge on configuring apache2 is just very basic.

NOW TIME TO INSTALL THE CMS

 

For mojoPortal i used:

a) mojoportal-2-2-8-2-c-pgsqlreleasefiles-for-mono.zip

b) mojoportal-2-2-8-2-c-mysqldatalayer.zip

 

Short install instructions for mojoPortal 2-2-8-2-c with Mono 2.2 on Linux with MySQL Database:

1. Extract the first archive a) and copy the wwwroot as your web root folder.

2. Extract all .dll files from archive b) into the wwwroot/bin/ folder.

3. Give write-access to all files and folders, including Data in wwwroot/Data to your webservers user/group (mostly www-data).

4.* cp user.config.sample user.config      ... copy the sample user.config and adjust inside the MySQL connection string. ---> Thats all

5. Browse to your site, and watch Setup performing well.

 

I noticed a few bugs now at my server:

4.* - The user.config file is not taken by the mod-mono-server2 from mod_mono apache2. i dont know why, when running xsp2 instead from cmdline, it works. --> The solution was to edit the Web.config directly and just change the MySql connection string to my needs.

Another bug is, that i cant change the password. its not updated. --> THATS AN IMPORTANT BUG.

I hope Joe has a fix for it soon.

 

 

 

1/17/2009 6:01:51 AM
Gravatar
Total Posts 18439

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

Another bug is, that i cant change the password. its not updated. --> THATS AN IMPORTANT BUG.

Its probably a Mono bug in their implementation of the ASP.NET password recovery control. It works fine on windows so its not a mojoPortal bug.

As a workaround, there is another place you can change the password. Click Member List, then click the gear icon next to the user name. The admin user can change anyones password this way.

Best,

Joe

1/17/2009 6:05:14 AM
Gravatar
Total Posts 18439

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

When building from sources I think you should build libgdiplus before mono.

Best,

Joe

1/17/2009 6:09:53 AM
Gravatar
Total Posts 44

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

good to know, will redo this again maybe

 

1/17/2009 6:16:24 AM
Gravatar
Total Posts 44

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

Changing the password by the user list did not work.

I saw that the password is in clear text, so i modified it.

after that i changed to hash-passwords in the site's config.

--> nothing changed in the database. hmmm? any idea?

1/17/2009 6:20:09 AM
Gravatar
Total Posts 18439

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

I would go to Administration Menu > System Log and clear the log to get rid of exceptions logged during install. Then try changing the password and see if any errors get logged that are useful.

You may need to change the password format back to 0 in mp_Sites table manually, then touch Web.config to clear the cache.

Best,

Joe

1/17/2009 6:35:10 AM
Gravatar
Total Posts 18439

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

I confirm that the password recovery does not seem to work in the Mono 2.2 release. It seems like it just doesn't submit the form.

I am able to change passwords from the member list user administration.

I confirm using pgsql when I tried changing to hashed passwords it did not hash the passwords. I need to investigate further to determine if its a mojoportal bug or mono bug.

Best,

Joe

1/17/2009 6:37:38 AM
Gravatar
Total Posts 44

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

I have also tried the rss-feed manager.

I have added with it a new rss feed, but after that i results in an error:

Server Error in '/' Application
The requested feature is not implemented.

Description: HTTP 500. Error processing request.

Stack Trace:

System.NotImplementedException: The requested feature is not implemented.
at System.Net.HttpWebRequest.set_UseDefaultCredentials (Boolean value) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateWebRequest (System.Uri source, ICredentials credentials, IWebProxy proxy) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateWebResponse (System.Uri source, ICredentials credentials, IWebProxy proxy) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateSafeNavigator (System.Uri source, ICredentials credentials, IWebProxy proxy, System.Text.Encoding encoding) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Load (System.Uri source, ICredentials credentials, IWebProxy proxy, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source, ICredentials credentials, IWebProxy proxy, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source) [0x00000]
at mojoPortal.Web.FeedUI.FeedCache.GetRssFeedEntries (Int32 moduleId, Guid moduleGuid, Int32 entryCacheTimeout, Int32 maxDaysOld, Int32 maxEntriesPerFeed, Boolean enableSelectivePublishing) [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.GetEntriesTable () [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.BindRepeater () [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [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]

 

Does this mean, the function is not yet implemented in mono ?

 

1/17/2009 6:38:59 AM
Gravatar
Total Posts 44

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

2009-01-17 13:36:11,777 ERROR mojoPortal.Web.mojoBasePage - 79.198.45.170-de-DE - /news.aspx
System.NotImplementedException: The requested feature is not implemented.
at System.Net.HttpWebRequest.set_UseDefaultCredentials (Boolean value) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateWebRequest (System.Uri source, ICredentials credentials, IWebProxy proxy) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateWebResponse (System.Uri source, ICredentials credentials, IWebProxy proxy) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateSafeNavigator (System.Uri source, ICredentials credentials, IWebProxy proxy, System.Text.Encoding encoding) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Load (System.Uri source, ICredentials credentials, IWebProxy proxy, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source, ICredentials credentials, IWebProxy proxy, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source) [0x00000]
at mojoPortal.Web.FeedUI.FeedCache.GetRssFeedEntries (Int32 moduleId, Guid moduleGuid, Int32 entryCacheTimeout, Int32 maxDaysOld, Int32 maxEntriesPerFeed, Boolean enableSelectivePublishing) [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.GetEntriesTable () [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.BindRepeater () [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [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-01-17 13:36:11,797 ERROR mojoPortal.Web.Global - 79.198.45.170-de-DE - /news.aspx
System.NotImplementedException: The requested feature is not implemented.
at System.Net.HttpWebRequest.set_UseDefaultCredentials (Boolean value) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateWebRequest (System.Uri source, ICredentials credentials, IWebProxy proxy) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateWebResponse (System.Uri source, ICredentials credentials, IWebProxy proxy) [0x00000]
at Argotic.Common.SyndicationEncodingUtility.CreateSafeNavigator (System.Uri source, ICredentials credentials, IWebProxy proxy, System.Text.Encoding encoding) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Load (System.Uri source, ICredentials credentials, IWebProxy proxy, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source, ICredentials credentials, IWebProxy proxy, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source, Argotic.Common.SyndicationResourceLoadSettings settings) [0x00000]
at Argotic.Syndication.GenericSyndicationFeed.Create (System.Uri source) [0x00000]
at mojoPortal.Web.FeedUI.FeedCache.GetRssFeedEntries (Int32 moduleId, Guid moduleGuid, Int32 entryCacheTimeout, Int32 maxDaysOld, Int32 maxEntriesPerFeed, Boolean enableSelectivePublishing) [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.GetEntriesTable () [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.BindRepeater () [0x00000]
at mojoPortal.Web.FeedUI.FeedManagerModule.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00000]
at System.Web.UI.Control.LoadRecursive () [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]
 

1/17/2009 6:41:45 AM
Gravatar
Total Posts 44

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

Ok changing the password with plain-text passwords works now.

but how to get the hashed-version running ?

1/17/2009 6:43:29 AM
Gravatar
Total Posts 18439

Re: mojoPortal 2-2-8-2-c running on Linux with Mono-2.2, mod_mono and MySQL @ .NET 3.5

Yes, apparently the RSS feature has some problems with things not yet implemented in Mono.

I found that I can change from clear text to encrypted and it works but changing back to plain text I get this:

System.Security.Cryptography.CryptographicException: Bad PKCS7 padding. Invalid length 85.
  at Mono.Security.Cryptography.SymmetricTransform.ThrowBadPaddingException (PaddingMode padding, Int32 length, Int32 position) [0x0005c] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs:363
  at Mono.Security.Cryptography.SymmetricTransform.FinalDecrypt (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x001a3] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs:515
  at Mono.Security.Cryptography.SymmetricTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x00034] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs:554
  at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x00000] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs:94
  at System.Web.Security.MembershipProvider.DecryptPassword (System.Byte[] encodedPassword) [0x00017] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs:123
  at mojoPortal.Web.mojoMembershipProvider.DecryptPassword (System.Byte[] encodedPassword) [0x00000]
  at mojoPortal.Web.mojoMembershipProvider.UnencodePassword (System.String pass, MembershipPasswordFormat passwordFormat) [0x00000]
  at mojoPortal.Web.mojoMembershipProvider.ChangeFromEncryptedPasswordsToClearText (System.Object objSiteSettings) [0x00000]

and when I try to change from clear text to hashed its logging this error:

System.TypeInitializationException: An exception was thrown by the type initializer for mojoPortal.Web.Framework.CryptoHelper ---> System.Security.Cryptography.CryptographicException: Couldn't decode XML ---> System.Security.Cryptography.CryptographicException: Missing Exponent
  at Mono.Security.Cryptography.RSAManaged.ImportParameters (RSAParameters parameters) [0x0027b] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/Mono.Security.Cryptography/RSAManaged.cs:357
  at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters (RSAParameters parameters) [0x00000] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs:230
  at System.Security.Cryptography.RSA.FromXmlString (System.String xmlString) [0x000a9] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/System.Security.Cryptography/RSA.cs:102
  --- End of inner exception stack trace ---
  at System.Security.Cryptography.RSA.FromXmlString (System.String xmlString) [0x000bd] in /usr/src/packages/BUILD/mono-2.2/mcs/class/corlib/System.Security.Cryptography/RSA.cs:106
  at mojoPortal.Web.Framework.CryptoHelper..cctor () [0x00000]
  --- End of inner exception stack trace ---
  at mojoPortal.Web.mojoMembershipProvider.ChangeFromClearTextPasswordsToHashed (System.Object objSiteSettings) [0x00000]

So these seem like Mono bugs.
 

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