0

I'm testing some MVC3 stuff on my test site on AppHarbor (http://test-1335.apphb.com).

I have my database running on AppHarbor, and I'm able to access the database when manually setting up the MySQLConnection. This can be tested by clicking 'Test' on my website.

        myConnectionString = "my connection string goes here...";

        try
        {
            conn = new MySql.Data.MySqlClient.MySqlConnection();
            conn.ConnectionString = myConnectionString;
            conn.Open();
            ViewBag.Response = "OK";
        }
        catch (MySql.Data.MySqlClient.MySqlException ex)
        {
            ViewBag.Response = ex.Message;
        }

When accessing the database through Entity Framework, I get a HTTP500 error. This can be tested by clicking the 'Drivers' link on my website.

I don't get any errors in the Errors page in the AppHarbor admin page, and things also run perfectly on my development machine.

Anyone elso who got the HTTP500 error on AppHarbor or any tips or ideas on how to get more details about the error?

  • 500 is Internal Server Error, it could mean any code error that lead to failure on page load. If you use IE to view the page, try to turn off "Friendly Error Message" in Internet Options > Advanced – Raptor Sep 11 '12 at 09:48
  • 1
    Could you try to remote debug your application and get place where exception is thrown? – Kirill Bestemyanov Sep 11 '12 at 09:49
  • I get following message when turning off the friendly error messages in IE: The page cannot be displayed because an internal server error has occurred. – Koen Steurs Sep 11 '12 at 09:52
  • It is not possible to remote debug the application as it is running on the AppHarbor hosting provider servers. – Koen Steurs Sep 11 '12 at 09:58

2 Answers2

0

Your site is currently showing Unable to find the requested .Net Framework Data Provider. It may not be installed.. See this question for details on how to resolve the problem.

Community
  • 1
  • 1
friism
  • 19,068
  • 5
  • 80
  • 116
0

I removed the reference to MySql.Data in the machine.config and added code below to the web.config.

<system.data>
<DbProviderFactories>
  <remove invariant="MySql.Data.MySqlClient" />
  <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,                    Version=6.5.4.0, Culture=neutral,                    PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>