RunTime error when trying setup

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.
10/2/2008 10:53:33 AM
Gravatar
Total Posts 32

RunTime error when trying setup

Hi, I have problem with mojo portal 2-2-7-3 for MSSQL

1) I just copied the folder of mojo to my hosting
2) I changed the web.config with the medium trust one
3) I deleted the DLL in the bin folder
4) I changed the DB connection parameter to the web.config
5) I changed the DB connection parameter to the user.config

But when I launch mydomain/setup/default.aspx I receive this error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 
 

May you help me becouse we would like to use mojo as CMS for our customer. We like it. Thank you 

 

10/2/2008 11:42:43 AM
Gravatar
Total Posts 18439

Re: RunTime error when trying setup

Look for this in your Web.config file:

<customErrors mode="RemoteOnly" defaultRedirect="Error.htm">
<error statusCode="404" redirect="~/PageNotFound.aspx" />
</customErrors>

Change "RemoteOnly" to "Off" and you wil be able to see what the error is. After its solved you should set it back to "RemoteOnly".

Hope it helps,

Joe

10/2/2008 11:51:18 AM
Gravatar
Total Posts 32

Re: RunTime error when trying setup

Thank you it works, but I still not understand:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Data at the root level is invalid. Line 1, position 2.

Source Error:


Line 1: object must be serialized into a byte array
Line 2: : using a System.ComponentModel.TypeConverter
Line 3: : and then encoded with base64 encoding.
 

Source File: /App_GlobalResources/Resource.nl.resx Line: 1
 

Any Idea?

10/2/2008 11:55:11 AM
Gravatar
Total Posts 18439

Re: RunTime error when trying setup

Are you sure this site is configured for 2.0 .NET and not 1.1?

You didn't post the whole error meesage.

Joe

10/2/2008 11:59:31 AM
Gravatar
Total Posts 32

Re: RunTime error when trying setup

Sorry I though was enough. The provider told me they are using framework 2.0

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Data at the root level is invalid. Line 1, position 2.

Source Error:


Line 1: object must be serialized into a byte array
Line 2: : using a System.ComponentModel.TypeConverter
Line 3: : and then encoded with base64 encoding.
 

Source File: /App_GlobalResources/Resource.nl.resx Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

10/2/2008 12:02:44 PM
Gravatar
Total Posts 18439

Re: RunTime error when trying setup

Try deleting the file /App_GlobalResources/Resource.zh-Hant.resx

and see if it makes a difference.

10/3/2008 8:07:16 AM
Gravatar
Total Posts 32

Re: RunTime error when trying setup

I deleted /App_GlobalResources/Resource.zh-Hant.resx
I deleted also App_GlobalResources/Resource.nl.resx that came after

and now

Server Error in '/' Application.
--------------------------------------------------------------------------------

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.Web.HttpContext.System.IServiceProvider.GetService(Type service) +54
Brettle.Web.NeatUpload.UploadHttpModule.GetCurrentWorkerRequest() +57
Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) +72
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

 

Please Help me becouse I'mvery interested in using Mojo portal

10/3/2008 12:42:06 PM
Gravatar
Total Posts 32

Re: RunTime error when trying setup

Hi joe, I did every thing from the beginning. And the old error went away but now I can't connect to the DB this is the error:

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: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: No such host is known at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostEntry(String hostNameOrAddress) at MySql.Data.Common.StreamCreator.GetHostEntry(String hostname) at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout) at MySql.Data.MySqlClient.NativeDriver.Open() --- End of inner exception stack trace --- at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at mojoPortal.Data.DBPortal.DatabaseHelperGetConnectionError(String overrideConnectionInfo)

This site appears to be running in a secured environment using Medium Trust policy or at least lower than Full Trust.
In order to use MySQL under Medium Trust, The MySQL Connector for .NET must be installed in the Global Assembly Cache on the server. If you see a SecurityException in the error message then the Connector is not installed. You can download the MySql Connector for .NET from here: http://dev.mysql.com/downloads/connector/net/5.0.html

In order for the Search Engine to work in Medium trust, you need to add this in Web.config in the AppSettings section:

<add key="Lucene.Net.lockdir" value="\\WAGNER\wwwroot$\artealtro.net\Data\Sites\1\index" />

 

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.


The connection string seems to be ok and I added the key to the web config.  But no way. Thanks again

10/3/2008 3:50:05 PM
Gravatar
Total Posts 18439

Re: RunTime error when trying setup

That error tells no lie, it can't connect to your MySql db.

Are you using MySql for the db? That doesn't work well in Medium Trust unless the host has the correct version of MySql connector installed in the GAC on the server.

I added the key to the web config

There is no need to add a key the connection sting setting already exists in the appSettings section of Web.config for all the dbs, you just have to pick the one for your db platform and set it to correct connection string value. ie. for MySql its this one you need to edit, ideally put it in user.config:

<add key="MySqlConnectionString" value="Data Source=localhost;Database=mojoportal;User ID=mojouser;Password=mojo123;Charset=utf8;" />

Hope it helps,

Joe

10/6/2008 2:15:16 AM
Gravatar
Total Posts 32

Re: RunTime error when trying setup

Hi Joe thanks for the answer. About you it is possible that the problem is becouse my provider give you in the hosting both DB MySql ang MSSql so how can mojo understand what connection string has to use?
And also how I can understand if the connector in my hosting is the right one?

Thank you always

10/6/2008 8:08:19 AM
Gravatar
Total Posts 18439

Re: RunTime error when trying setup

mojoPortal knows which database to use because there is always only 1 version of the data access dll files. In other words we have different versions of mojoPortal.Data.dll and mojoPortal.Features.Data.dll and WebStore.Data.dll for each supported platform. Rleases packages are created for each db platform and include the correct dlls for that platform.

Your error message refers to "MySql.Data.MySqlClient" which clearly means you have the MySql versions of the data dlls. In medium trust, if you have a choice between MS  SQL and MySql, I recomend you go with MS SQL because you will have less trouble that way.

So my recommendation is download the mojoportal package for MS SQL (mojoportal-2-2-7-3-mssqlreleasefiles.zip) and install that and do not use the MySql data layer.

Hope it helps,

Joe

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