jamesstill
12-15-2010, 08:00 PM
I saw several devs were having trouble with this stack so I thought I'd do a quick how-to post since I'm hosting truthwidget.com here with no trouble. I'll assume you have MySQL 5.n installed localhost as well as MySQL Connector Net 6.n.n and have been successfully developing against it and EF 4 on top of it. Now it's time to deploy to discountasp.net:
(1) So that RIA works correctly in Web.config disable basic authentication:
<configuration>
<system.web>
<system.webServer>
<security>
<authentication>
<basicAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</system.web>
</configuration>
(2) Also in Web.config configure MySQL as a provider:
<system.data>
<DbProviderFactories>
<add name="MySQL Data Provider"
invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
</DbProviderFactories>
</system.data>
(3) Bin deploy the following DLLs as they are not in the GAC:
System.ServiceModel
System.ServiceModel.DomainServices.EntityFramework
System.ServiceModel.DomainServices.Hosting
System.ServiceModel.DomainServices.Server
MySql.Data
That's it. Another thing I did was use Web.config transforms so that I could put my localhost EF connection string in Web.config per normal but my prod connection string in the Web.Release.config.
James
truthwidget.com a production of squarewidget.com
(1) So that RIA works correctly in Web.config disable basic authentication:
<configuration>
<system.web>
<system.webServer>
<security>
<authentication>
<basicAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</system.web>
</configuration>
(2) Also in Web.config configure MySQL as a provider:
<system.data>
<DbProviderFactories>
<add name="MySQL Data Provider"
invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
</DbProviderFactories>
</system.data>
(3) Bin deploy the following DLLs as they are not in the GAC:
System.ServiceModel
System.ServiceModel.DomainServices.EntityFramework
System.ServiceModel.DomainServices.Hosting
System.ServiceModel.DomainServices.Server
MySql.Data
That's it. Another thing I did was use Web.config transforms so that I could put my localhost EF connection string in Web.config per normal but my prod connection string in the Web.Release.config.
James
truthwidget.com a production of squarewidget.com