Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

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.
11/7/2011 5:37:02 AM
Gravatar
Total Posts 26

Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

Hei,
 grreat boys !!

What about this --> ?

 

Welcome to mojoPortal Setup

Verifica del sistema...
Privilegi del File system ok.
An Error Occurred:The type initializer for 'System.Data.SqlServerCe.SqlCeConnection' threw an exception.
Source:System.Data.SqlServerCe

Stack Trace at System.Data.SqlServerCe.SqlCeConnection..ctor(String connectionString) at mojoPortal.Data.DBPortal.DatabaseHelperCanAccessDatabase(String overrideConnectionInfo) at mojoPortal.Web.UI.Pages.SetupHome.ProbeSystem() 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 consideration ??

Thanks a lto !! ;-)

11/7/2011 10:48:44 AM
Gravatar
Total Posts 18439

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

Sorry but when I test it it works fine.

Make sure you have .NET 4 hosting.

Other than that I have no idea what would cause that error.

11/7/2011 2:25:50 PM
Gravatar
Total Posts 26

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

I have .net 4.0...

I tried to setup a personal solution with sql ce 4.0 and it work...

So the problem is the mojo software I think....

If you can put some controls-step when someone make a setup it will
be better and a great thing i think.

One of the controls has to be the db connection...

When Mojo perform the setup it makes a lot of description about directories,permission
and modules and db schema but it does not make some basilar controls about database
so everyone can understand the problem...

Do you or not ? ;-)

 

 

 

 

11/7/2011 2:36:46 PM
Gravatar
Total Posts 18439

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

Make sure the /App_Data folder is writable by the user that is the identity on the application pool. If it cannot create a file there then it cannot create the database. 

 

11/7/2011 2:45:49 PM
Gravatar
Total Posts 26

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

OK I TRY NOW...

11/7/2011 2:51:09 PM
Gravatar
Total Posts 26

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

ALL THE FOLDERS DATA and app_data are writable... mmm the mojodb.sdf is in the app_data...
what about the web.config or user.config...??

11/7/2011 2:59:45 PM
Gravatar
Total Posts 18439

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

It doesn't need anything in Web.config or user.config because it resolves the path to the db in the /App_Data folder .

public static string GetConnectionString()
        {
            if (ConfigurationManager.AppSettings["SqlCeApp_Data_FileName"] != null)
            {
                string path = System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data/" + ConfigurationManager.AppSettings["SqlCeApp_Data_FileName"]);
                string connectionString = "Data Source=" + path + ";Persist Security Info=False;";

                return connectionString;
            }

            return ConfigurationManager.AppSettings["SqlCeConnectionString"];
           
        }

The error is in initializing the type which seems more likely a problem with the hosting environment. SQL CE can work in Medium Trust hosting but your host may have a custom trust level that is more strict and that may prevent it from working.

I would check with your host about the trust level.

11/7/2011 3:10:50 PM
Gravatar
Total Posts 26

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

I have made a little software in asp net to see

I have used sql ce 4.1 and it works very well
So... I cannot understand why your way is not working....

In case of using Sql ce you can make some controls like:

 make a control about the framework version everytime and then....

 A) Try to write a file in the app_data and return Ok or Failure

 B) Try to create the db .sdf file and return Ok or failure 

 C) Try to create the table schema and return Ok or Failure

 D) Perform a check in the db objects created and return Ok or Failure

 E) Try to put some data into the db and return Ok or Failure...

     ecc....

Ahah ??? do you ??? ;-)   

 two beers please !! ;-)

 

11/7/2011 3:22:10 PM
Gravatar
Total Posts 26

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

Can you make a little test page for Sql Ce ??

I repeat : I have done one test by me with a asp.net page and it works... !!

So ... it's strange .... I want to test MOJO ... why why why why ???????????? ;-)

11/7/2011 3:26:09 PM
Gravatar
Total Posts 70

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

Based on the code Joe posted, you can try removing this setting from Web.config:

SqlCeApp_Data_FileName

and put in your own connection string using

SqlCeConnectionString

but you'll have to know the file system path to the database file

11/7/2011 3:47:34 PM
Gravatar
Total Posts 26

Re: Mojo 2.3.7.0 SqlCe Installation FAILURE on Aruba Hosting

I think this is not a good thing... If I have all in the app_data , your code has to work...

 but now i want to check the path.... now i check... ;-)

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