Error when when using any other kind of content than HTML on a page

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/16/2009 2:11:57 PM
Gravatar
Total Posts 44

Error when when using any other kind of content than HTML on a page

Server Error in '/' Application
Can't cast Line into any valid DbType.

Description: HTTP 500. Error processing request.

Stack Trace:

System.InvalidCastException: Can't cast Line into any valid DbType.
at Npgsql.NpgsqlParameter..ctor (System.String parameterName, NpgsqlDbType parameterType, Int32 size, System.String sourceColumn) [0x00000]
at Npgsql.NpgsqlParameter..ctor (System.String parameterName, NpgsqlDbType parameterType) [0x00000]
at (wrapper remoting-invoke-with-check) Npgsql.NpgsqlParameter:.ctor (string,NpgsqlTypes.NpgsqlDbType)
at mojoPortal.Data.DBBlog.GetDrafts (Int32 moduleId) [0x00000]
at mojoPortal.Business.Blog.GetDrafts (Int32 moduleId) [0x00000]
at mojoPortal.Business.Blog.CountOfDrafts (Int32 moduleId) [0x00000]
at mojoPortal.Web.BlogUI.BlogModule.LoadSettings () [0x00000]
at mojoPortal.Web.BlogUI.BlogModule.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]

Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433

1/16/2009 2:19:32 PM
Gravatar
Total Posts 18439

Re: Error when when using any other kind of content than HTML on a page

I just released a new package for Mono that may work better for you. I can add a blog and post to it with no errors using the latest mojoportal and the Mono 2.2 release.

In any case the error message you posted is related only to the blog not to all features except html.

Best,

Joe

1/16/2009 2:31:53 PM
Gravatar
Total Posts 18439

Re: Error when when using any other kind of content than HTML on a page

I tried adding a blog draft by setting a future date on the post, then the "Edit Drafts" link appears. I confirm there seems to be a bug in the pgsql version because when I click the link I get an error though different than the one you posted.

System.Web.HttpException: Property Heading not found in System.Data.Common.DbDataRecord
at System.Web.UI.DataBinder.GetPropertyValue (System.Object container, System.String propName) [0x0006c] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/DataBinder.cs:192
at System.Web.UI.DataBinder.Eval (System.Object container, System.String expression) [0x00078] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/DataBinder.cs:74
at ASP.blog_drafts_aspx.__BuildControl__bctrl_62_DB_1 (System.Object sender, System.EventArgs e) [0x00000]
at (wrapper delegate-invoke) System.EventHandler:invoke_void__this___object_EventArgs (object,System.EventArgs)
at System.Web.UI.Control.OnDataBinding (System.EventArgs e) [0x00029] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:908
at System.Web.UI.Control.DataBind (Boolean raiseOnDataBinding) [0x0003c] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:1828
at System.Web.UI.Control.DataBind () [0x00000] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:1236
at System.Web.UI.Control.DataBindChildren () [0x0002c] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:1255
at System.Web.UI.Control.DataBind (Boolean raiseOnDataBinding) [0x00047] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:1829
at System.Web.UI.Control.DataBind () [0x00000] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:1236
at System.Web.UI.WebControls.Repeater.DoItem (Int32 i, ListItemType t, System.Object d, Boolean databind) [0x00053] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI.WebControls/Repeater.cs:116
at System.Web.UI.WebControls.Repeater.CreateControlHierarchy (Boolean useDataSource) [0x0008e] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI.WebControls/Repeater.cs:148
at System.Web.UI.WebControls.Repeater.OnDataBinding (System.EventArgs e) [0x00022] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI.WebControls/Repeater.cs:92
at System.Web.UI.WebControls.Repeater.DataBind () [0x00000] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI.WebControls/Repeater.cs:164
at mojoPortal.Web.BlogUI.BlogDraftsPage.PopulateControls () [0x00000]
at mojoPortal.Web.BlogUI.BlogDraftsPage.Page_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00029] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:954
at mojoPortal.Web.mojoBasePage.OnLoad (System.EventArgs e) [0x00000]
at System.Web.UI.Control.LoadRecursive () [0x00020] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Control.cs:1433
at System.Web.UI.Page.ProcessLoad () [0x0004a] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Page.cs:1592
at System.Web.UI.Page.ProcessPostData () [0x0004d] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Page.cs:1570
at System.Web.UI.Page.InternalProcessRequest () [0x001bf] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Page.cs:1528
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x0005b] in /usr/src/packages/BUILD/mono-2.2/mcs/class/System.Web/System.Web.UI/Page.cs:1347

But other than drafts it works as expected. I will look into the bug with drafts for the next release.

Best,

Joe

1/16/2009 2:59:07 PM
Gravatar
Total Posts 44

Re: Error when when using any other kind of content than HTML on a page

Wow, that was fast! :)

Let me give it a try.

1/16/2009 3:43:24 PM
Gravatar
Total Posts 44

Re: Error when when using any other kind of content than HTML on a page

Server Error in '/' Application
Could not load type 'mojoPortal.Web.MonoCompilationSection, mojoPortal.Web'.

Description: HTTP 500. Error processing request.

Stack Trace:

System.TypeLoadException: Could not load type 'mojoPortal.Web.MonoCompilationSection, mojoPortal.Web'.
at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
at System.Type.GetType (System.String typeName, Boolean throwOnError) [0x00000]
at Mono.Web.Util.SettingsMapping.get_MapperType () [0x00000]
at Mono.Web.Util.SettingsMapping.MapSection (System.Object input, System.Type type) [0x00000]
at Mono.Web.Util.SettingsMappingManager.MapSection (System.Object input, System.Type type) [0x00000]
at Mono.Web.Util.SettingsMappingManager.MapSection (System.Object input) [0x00000]
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x00000]
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName) [0x00000]
at System.Web.Compilation.AppResourcesAssemblyBuilder..ctor (System.String canonicAssemblyName, System.String baseAssemblyPath, System.Web.Compilation.AppResourcesCompiler appres) [0x00000]
at System.Web.Compilation.AppResourcesCompiler.CompileGlobal () [0x00000]
at System.Web.Compilation.AppResourcesCompiler.Compile () [0x00000]
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000]

Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433

 

 

I get this error, after a fresh install of mojoPortal from your latest release c.

What i did:

1. wwwroot from ms-release as base.

2. copied over mysql-layer into the bin folder of the base.

3. copied user.sample.config to user.config.

4. replaced my db connection and commented the other db-connectionstrings, after i dropped all tables in the mysql-db.

---

Any idea what i could have missed?

Or maybe, whats wrong ?

CombinedRSS is already false...

1/16/2009 3:45:52 PM
Gravatar
Total Posts 18439

Re: Error when when using any other kind of content than HTML on a page

You can't use the ms sql version as a base its compiled for windows, you need to use mojoportal-2-2-8-2-c-pgsqlreleasefiles-for-mono.zip, its compiled on linux and is a special build for mono. You can then replace the data dlls as you did before.

Hope it helps,

Joe

1/16/2009 4:14:30 PM
Gravatar
Total Posts 44

Re: Error when when using any other kind of content than HTML on a page

 

hmm...

 

could you please rename the release file to:

 

mojoportal-2-2-8-2-c-pgsqlreleasefiles-for-mono_H_E_F_T_I__Y_O_U__M_U_S_T__T_A_K_E__T_H_I_S__O_N_E__F_O_R__M_O_N_O_!!!!!.zip

 

Lol, thankyou again.

This could be the source of all problems, but after that i got the next error on Setup :(
I will try to copy these files by hand.. Permissions are correct btw.

mojoPortal Content Management System Welcome to mojoPortal Setup
Probing system...
File system permissions problems found.
An Error Occurred:Could not find a part of the path "/home/xna-germany/wwwroot/Data/Sites/1/GalleryImages/test.config".
Source:mscorlib
Stack Trace at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool) at System.IO.File.CreateText (System.String path) [0x00000] at mojoPortal.Web.mojoSetup.TouchTestFile (System.String pathToFile) [0x00000] at mojoPortal.Web.UI.Pages.SetupHome.GetFolderDetailsHtml () [0x00000] at mojoPortal.Web.UI.Pages.SetupHome.ProbeSystem () [0x00000] at mojoPortal.Web.UI.Pages.SetupHome.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.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/16/2009 4:20:46 PM
Gravatar
Total Posts 18439

Re: Error when when using any other kind of content than HTML on a page

On setup its testing the folder permissions buy creating this test.config file in several folders. The /Data folder must be writable by the web process.

Hope it helps,

Joe

1/16/2009 4:31:42 PM
Gravatar
Total Posts 44

Re: Error when when using any other kind of content than HTML on a page

yep, i found out the same and just wanted to post it here.

There could be a little improvement in the setupscript.

I had to create the GalleryImages folder by hand, to get to the position, where the script tells me, that the permissions are wrong.

Without that folder, this message is not displayed, which is not very useful.

So it would be cool, if the order of these permission-checks could be changed.

Now he is complaining about my Data-Connection.

I tried to use the user.config this time, such it was mentioned in the web.config.

But it seems not to work like it should.

<appSettings file="user.config">  -- default line from web.config.

in my root folder, there is a user.config with the working connectionstring from the previous install.

Do i have to place the user.config anywhere else?

 

mojoPortal Content Management System Welcome to mojoPortal Setup
Probing system...
File system permissions ok.
The system cannot connect to the MySQL database. Please check your connection string.

MySql.Data.MySqlClient.MySqlException: Access denied for user 'mojouser'@'localhost' (using password: YES) at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] at MySql.Data.MySqlClient.NativeDriver.Authenticate411 () [0x00000] at MySql.Data.MySqlClient.NativeDriver.Authenticate () [0x00000] at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () [0x00000] at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x00000] at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver () [0x00000]

Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.

1/16/2009 4:36:25 PM
Gravatar
Total Posts 18439

Re: Error when when using any other kind of content than HTML on a page

on windows it does tell about file permission problems based on its attempt to write those files.

user.config goes in the root. The only thing to be aware is it will not detect changes to user.config automatically, you have to touch Web.config by type a space and save that will make it recycle the app, clear the cache, reload settings.

Access denied for user 'mojouser'@'localhost'

indicates it is talking to the MySql server but permissions aren't correct for the user.

Hope it helps,

Joe

1/16/2009 4:39:32 PM
Gravatar
Total Posts 44

Re: Error when when using any other kind of content than HTML on a page

thats part of your default settings, which i should not touch in web.config:

 

<!-- ******* Database Settings *********************************** -->^
<!-- Note that each db platform has its own connection string, but the database used depends on which data dlls are in the bin folder^
it is not determined by configuration settings.^
-->^
^
<!-- MS SQL Database Settings *************************************** -->^
<add key="MSSQLConnectionString" value="server=yourservername;UID=yourdatabaseusername;PWD=yourdatabaseuserpassword;database=yourdatabasename" />^
<!-- ^
For using MS SQL set this to true for best performance but if running the web on mono you may need to set this to false. -->^
<add key="CacheMSSQLParameters" value="true" />^
<!-- do not change this unless you understand the workings of the code^
and have a reason to change it. -->^
<add key="MSSQLOwnerPrefix" value="[dbo]." />^
<!-- end MS SQL Database Settings *************************************** -->^
^
<add key="PostgreSQLConnectionString" value="Server=localhost;Port=5432;Encoding=unicode;User Id=mojouser;Password=mojo123;Database=mojoportal;Pooli
<add key="MySqlConnectionString" value="Data Source=localhost;Database=mojoportal;User ID=mojouser;Password=mojo123;Charset=utf8;" />^
<add key="FirebirdConnectionString" value="Data Source=localhost;Server Type=0;Port Number=3050;Database=C:\Users\JoeAudette\devprojects\mojoportal\
<add key="SqliteConnectionString" value="defaultdblocation" />^
<!--^
you can use a fully qualified file path as shown below^
or if you are using the default db at /Data/sqlitedb/mojo.db.config^
just leave this set to "defaultdblocation"^
<add key="SqliteConnectionString" value="version=3,URI=file:C:\\Projects\mojoportal\Web\Data\sqlitedb\mojoportal.db" />^
-->^
<!-- ******* End Database Settings *********************************** -->^
^

 

i am using a complete other username, which definitive works.
 

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