Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Oluwole Kolawole 32 posts 53 karma points
    Feb 28, 2011 @ 15:42
    Oluwole Kolawole
    0

    Umbraco on GoDaddy Shared Hosting

    Hi everyone,

    Apologies if there is already a solution to this somewhere in the forum; a search so far has turn up several topics but not solution of rmy problem.

    I have a GoDaddy shared hosting account that runs an existing website. I want to install Umbraco into a sub-folder in order to show my client what their Umbraco website will look like. So I've done the following:

    1. Used the GoDaddy IIS management tool to create a new application folder for the site.
    2. Copied the entire Umbraco folder structure from my development system to this sub-folder.
    3. Created a MySQL database on GoDaddy.
    4. Used MySQL Workbench to dump the Umbraco database schema and data to a .sql file.
    5. Used the GoDaddy MySQL Admin tool to import the .sql file (note I had to edit out the data for the umbracolog table as it was large and GoDaddy was choking on it).
    6. Changed the database connection string in the web.config file to point to the GoDaddy MySQL database.
    7. Tried to run the new Umbraco installation and got the following error:
    [SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.]
       System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
       System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
       System.Security.CodeAccessPermission.Demand() +46
       System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) +99
    

    I called GoDaddy technical support and they say it is a trust issue and that Umbraco requires Full Trust (I'm using Umbraco 4.6.1). I have put the line

    <

     

     

     

    trust level="Medium" />

    into the web.config file and changed the line:

    <

     

     

     

    to

    add key="umbracoUseMediumTrust" value="false" />

    <

     

     

     

    but the problem remains!

    I noticed the line

    <

     

     

     

    In the web.config file that refers to the localhost ip address but don't know what this line is saying and if this might be an issue when the webconfig file is not on localhost.

    Apologies for the long post, but any help gratefully received.

    Regards,
    Wole.

    sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />

    add key="umbracoUseMediumTrust" value="true" />

  • Oluwole Kolawole 32 posts 53 karma points
    Feb 28, 2011 @ 15:57
    Oluwole Kolawole
    0

    Apologies for the wonky post, the Umbraco forum is constantly messing up the formatting of the post. Hope you can re-assembly the text in some coherent order!!

    Wole.

  • E.J. Brennan 73 posts 114 karma points
    Feb 28, 2011 @ 17:06
    E.J. Brennan
    0

    Can't help you with the GoDaddy issue, but my web.config has the same entry as yours, and it works on both my local version running in VS2010, and also on my decicated web host in IIS7.5 without changes - so I don't think that is your issue.

     

    Have you made sure your file/directory permissions are setup properly? Early on a lot of the problems I had were related to improper security/permission settings. Can't help you with how to set them in godaddy however.

  • Julius Bartkus 51 posts 76 karma points
    Feb 28, 2011 @ 17:58
    Julius Bartkus
    0

    Hey, 

    Add requiredPermission="false" in web.config to these entries

    <section name="clientDependency" requirePermission="false" type="ClientDependency.Core.Config.ClientDependencySection, ClientDependency.Core"/>
    <section name="Examine" requirePermission="false" type="Examine.Config.ExamineSettings, Examine"/>
    <section name="ExamineLuceneIndexSets" requirePermission="false" type="UmbracoExamine.Config.ExamineLuceneIndexes, UmbracoExamine"/>

    /Julius Bartkus

  • Oluwole Kolawole 32 posts 53 karma points
    Feb 28, 2011 @ 23:51
    Oluwole Kolawole
    0

    Hi Julius,

    Thanks very much for the suggestion...this has moved me on and I'm no longer getting the Security Exception.

    Unfortunately, now I'm getting an exception related to Umbraco not being able to connect to the MySQL database. The error I'm getting is:

    [Exception: Exception of type 'System.Exception' was thrown.]
       MySql.Data.MySqlClient.NativeDriver.Open() +218

    [MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
       MySql.Data.MySqlClient.NativeDriver.Open() +267
       MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +87
       MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +23
       MySql.Data.MySqlClient.MySqlPool.GetConnection() +79
       MySql.Data.MySqlClient.MySqlConnection.Open() +222
       MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters) +65
       umbraco.DataLayer.SqlHelpers.MySql.MySqlHelper.ExecuteReader(String commandText, MySqlParameter[] parameters) +33
       umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) +87

    I've checked the connection string in config.db against the connection string that GoDaddy says to use and can't see what I'm doing wrong. The connection string is:

    <add key="umbracoDbDSN" value="server=canuk.db.7188040.hostedresource.com;port=3306;database=canuk;user id=canuk;password=**myverysecurepwd**;datalayer=MySql;" />

    I get the error with or without including the 'port=3306' parameter. 'canuk.db.7188040.hostedresource.com' is what GoDaddy says is the name of the MySQL db server and their phpMyAdmin utility is able to open the database with no issues using this same server name!

    Please help...again!
    Wole.

  • Oluwole Kolawole 32 posts 53 karma points
    Feb 28, 2011 @ 23:55
    Oluwole Kolawole
    0

    @E.J.,

    GoDaddy actually recommended using a dedicated server since you can then run on that with full trust. But I can't afford a dedicated server right now, and even if I could, I'm doing this for a client and they definitely can't.

    Thanks for trying to help though.

  • Julius Bartkus 51 posts 76 karma points
    Mar 01, 2011 @ 00:12
    Julius Bartkus
    0

    hey,
    i have it working like this: 

    <add key="umbracoDbDSN" value="server=dbname.db.7394295.hostedresource.com;database=dbname;user id=dbuser;password=pass;datalayer=MySql"/>

  • Oluwole Kolawole 32 posts 53 karma points
    Mar 01, 2011 @ 00:48
    Oluwole Kolawole
    0

    Which is exactly what I have as well (expect for 'port=3306' which I've determined makes no difference with or without anyway).

    Any ideas how to troubleshoot this anyone? I should probably just get on the phone to GoDaddy again...sigh!

  • Oluwole Kolawole 32 posts 53 karma points
    Mar 01, 2011 @ 02:22
    Oluwole Kolawole
    0

    On the phone to GoDaddy for about 35 minutes...no joy! They say everything is ok with the database and it must be a scripting error. I can't see anything...what else can I check?

    Please...!

  • Oluwole Kolawole 32 posts 53 karma points
    Mar 08, 2011 @ 21:38
    Oluwole Kolawole
    0

    Hi everyone,

    Found a solution to my GoDaddy woes. It turns out that if Umbraco cannot write the connection string to the web.config file, then you could have issues with connecting to the database.

    What I actually did was to delete the whole Umbraco installation on GoDaddy then copy in a fresh uninstalled copy of v4.6.1. I then changed the relevant entries in the web.config file to allow for medium trust (see Julius' first post above) and went through the installation steps.

    I also had to set file permissions to allow Umbraco to write to the web.config file (not easy (or even possible) if you are installing in the root, but I was installing to a sub-folder).

    It all seems to work now :-), but I'm still testing.

    HTH,

    Regards,
    Wole. 

Please Sign in or register to post replies

Write your reply to:

Draft