Webhotel issues: renaming db etc.

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.
7/22/2006 10:42:06 AM
Gravatar
Total Posts 15

Webhotel issues: renaming db etc.

Hello,

First of all, I would like to express my appreciation of this project. I have been looking for a long time to find a good cms based on ASP.NET & MySQL and now I have found it! I am planning on using it for several of my websites. I am so excited I can't wait to get it up and started.

One of the reasons I am happy with Mojoportal is that I am having my websites on a webhotel that I am reasonable satisfied with and that only support ASP.NET & MySQL. However, installing a cms like this on a remote system is problematic, because you are not in full control. The service of the webhotel is minimal, so I don't expect any special favours.

One issue is that my webhotel includes one standard MySQL database with a fixed name, which of course is not 'mojoportal'. So I was wondering whether I could rename the database-filename in web.config or would that create havoc later on in the process? Another solution would be for me to order an extra database with the proper name. But if I could simply do a rename in web.config, then I wouldn't have to spend money.

I have more webhotel-issues, but let's start with this one.

Thanks in advance for any help!
7/22/2006 11:03:01 AM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

Hi Fedor,

Yes absolutely you can name the db anything you like. Just enter the correct information in the connection string for MySQL.

If you are just getting started you might wait and use the new version which will be released later this evening.

Joe
7/22/2006 1:06:29 PM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

Thanks, Joe! A similar issue has to do with the user name (I cannot run the users & permissions script) but I suppose that too can be solved in web.config.

Where are errors logged? In the database or some file?

Cheers,

Fedor
7/22/2006 1:20:23 PM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

Yes, you don't need to run the create database script or the create user script, just put the user you have in the connection string. The user does need permission to create temp tables in the db as temp tables are used for paging and sorting in the forums and other places.

Errors are logged in Web/Data/currentlog.config file

Joe
7/22/2006 1:38:36 PM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

Thanks! I found and adjusted everything in web.config. OK, everything's seems to go smoothly. Time for the customary debugging...

I have just stumbled upon an inexplicable error: http://www.steeman.dk/Default.aspx Apparantly an SQL Server connections is supposed to be established!? What about MySQL?

Oh, well, I am going to bed now and look at it again tomorrow...
7/22/2006 1:42:04 PM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

Come to think of it: Previously I had tried to install a website based on SQL Server that gave me the exact same error. Perhaps the Default.aspx.cs file is still cached on the server somewhere I can not look...
7/22/2006 2:02:52 PM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

You installed the MS SQL version, there is a separate download for the MySQL Data layer on the download page.
You need to download this and then replace the mojoPortal.Data.dll in the bin folder beneath your site with the correct version for MySQL. You also have to put the MySql.Data.dll and the sharpziplib.dll in the bin folder to make it use MySQL.

Hope it helps,

Joe
7/22/2006 10:16:37 PM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

Hi Joe,

I thought I did that, but I will just try again and let you know if it helped.

Cheers,

Fedor
7/22/2006 10:33:48 PM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

Oh, I see, I had extracted them to the wrong folder. At least now I get a MySQL error :

Object reference not set to an instance of an object


[NullReferenceException: Object reference not set to an instance of an object.]
MySql.Data.Common.DBConnectionString.ParseKeyValuePairs(String src) +30
MySql.Data.Common.DBConnectionString.Parse(String newConnectString) +31
MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString) +42
MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters) +38
MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText) +7
mojoPortal.Data.dbPortal.SiteSettings_GetSiteList() +121
mojoPortal.Business.SiteSettings.SiteCount() +9
mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e) +53
http://www.steeman.dk/
7/23/2006 12:07:20 AM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

I suppose it has problems connecting to the database (thus not generating an instance of the connection).

OK, this is the modified connectionstring in web.config:

<add name="MySQLConnectionString" connectionString="server=mysql1.unoeuro.com;database=steeman_dk_db;uid=steeman_dk;pwd=62468109"
                    providerName="MySql.Data.MySqlClient" />
Modified according to information from the webhotel:

Server:        mysql1.unoeuro.com
Username:    steeman_dk
Password:    62468109
Database:    steeman_dk_db

Seems like I have done everything by the book.
7/23/2006 12:15:18 AM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

Oh, and I had also succesfully ran the script generating all the database tables...
7/23/2006 4:46:32 AM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

Are you using 2.1 or 2.1.1?  Or maybe you are using 2.1 with the MySQL Data layer for 2.1.1, You should probably upgrade to 2.1.1 since there are no table changes just re-upload the web site with the new release and the new version of the MySQL data layer and change to the new connection string in appSettings

In 2.1 the connection string is in the connection string section like this:

<connectionStrings>

        <add        name="MySQLConnectionString"
                            connectionString="server=bagend;Database=mojolocal;User ID=mojo;Password=mojo1"
                    providerName="MySql.Data.MySqlClient" />

But in 2.1.1 its in appSettings section like this:

<appSettings file="user.config">
 
    <add key="MySqlConnectionString" value="Data Source=localhost;Database=mojoportal;User ID=mojouser;Password=mojo123" />


I noticed your connection string has uid and pwd, those might also work but not sure.

Hope it helps,

Joe
7/23/2006 9:43:36 AM
Gravatar
Total Posts 15

Configuration Error

Great! It now looks like I can connect to the database. After I uploaded the new versions, it complained over an unknown field. So after dropping and regenerating all tables, I must have moved past this point.

Up to the next error message, that I don't know enough about to be able to solve:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Exception has been thrown by the target of an invocation.

Source Error:

Line 302:        <roleManager enabled="true" defaultProvider="mojoRoleProvider">
Line 303:            <providers>
Line 304:                <add name="mojoRoleProvider" type="mojoPortal.Web.mojoRoleProvider"  />
Line 305:            </providers>
Line 306:        </roleManager>

Huh?
7/23/2006 10:36:16 AM
Gravatar
Total Posts 15

Object reference not set to an instance of an object.

I reckoned that the error may lie in the fact that mojoportal was not installed in a folder name "mojoportal", but "public_html", so I changed the web.config accordingly:

<roleManager enabled="true" defaultProvider="mojoRoleProvider">
            <providers>
                <add name="mojoRoleProvider" type="public_html.Web.mojoRoleProvider"  />
            </providers>
        </roleManager>

And yet again it seems to refuse connection the the database:

Server Error in '/' Application.
Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

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:

[NullReferenceException: Object reference not set to an instance of an object.]
   MySql.Data.Common.DBConnectionString.ParseKeyValuePairs(String src) +30
   MySql.Data.Common.DBConnectionString.Parse(String newConnectString) +31
   MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(String value) +25
   MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString) +70
   MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters) +38
   mojoPortal.Data.dbPortal.FriendlyUrl_GetByUrl(String HostName, String FriendlyUrl) +228
   mojoPortal.Business.FriendlyUrl.GetFriendlyUrl(String hostName, String friendlyUrl) +15
   mojoPortal.Business.FriendlyUrl..ctor(String hostName, String friendlyUrl) +9
   mojoPortal.Web.SiteUtils.RewriteUrl(HttpApplication app) +174
   mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) +130
   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.42; ASP.NET Version:2.0.50727.42
7/23/2006 11:12:11 AM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

That setting has nothing to do with folder name, you need to change that back.

The error you got about roles usually happens if a null siteSettings object gets cached. Making a change like adding a space to web.config and save and it will force the app to restart and then hopefully your siteSettings object will not be null.
7/23/2006 11:29:56 AM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

Did you upgrade to 2.1.1?
Did you change your connection string to be under appSettings and with key, value attributes? instead of name connectionString?
7/23/2006 12:48:05 PM
Gravatar
Total Posts 15

Access to the path ..\Data\Sites\1\themecachedependecy.config' is denied

> That setting has nothing to do with folder name, you need to change that back.
>Making a change like adding a space to web.config and save and it will force the app to restart
>and then hopefully your siteSettings object will not be null.

Allrighty! Will do so...

> Did you upgrade to 2.1.1?

Yup. Cleaned everything out and installed the latest versions...

> Did you change your connection string to be under appSettings and with key,
> value attributes? instead of name connectionString?

Yes, I changed these accordingly:

<add key="MySqlConnectionString" value="Data Source=mysql1.unoeuro.com;Database=steeman_dk_db;User ID=steeman_dk;Password=62468109" />

I have ensured that I uploaded the right web.config file, but now (of course) I get a new error message:

Access to the path 'd:\web\localuser\steeman.dk\public_html\Data\Sites\1\themecachedependecy.config' is denied


Will this never end?

7/23/2006 12:53:44 PM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

That error usually means the folder is not writeable by the aspnet worker process. The Data folder and all its child folders need to be writable.
7/23/2006 2:04:12 PM
Gravatar
Total Posts 15

Re: Webhotel issues: renaming db etc.

Sounds like something the webhotel company needs to solve. There will probably pass a couple of days for them to answer, and then they could decline doing anything about it, because 'it's the way it is'... :-(

Thanks very much for your help so far ;-) I owe you one!
7/23/2006 2:07:43 PM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

Well, hopefully they will help you out. Please let me know how it turns out or if I can be of any more help.

Thanks,

Joe
7/24/2006 2:44:47 AM
Gravatar
Total Posts 15

Oh, my goodness, it's alive!!!

I have a very broad grin on my face: http://www.steeman.dk/

Thanks for everything!

Fedor
7/24/2006 3:22:40 AM
Gravatar
Total Posts 18439

Re: Webhotel issues: renaming db etc.

Excellent! Glad you're up and running and good to know that mojoportal can work at WebHotel hosting.

Cheers,

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