问题
I'm building an ASP.NET MVC3 application that requires access to a database. I've successfully set up the database on my local machine and everything works fine but then I uploaded the app to appharbor.com for testing and now I can't access the database anymore.
How do you add a connection string for a SQLEXPRESS database on appharbor.com? The database file is in located in the App_Data folder. I've been trying for days to make it work without avail. I already added the SQL Server add-on on appharbor. I'm not using any Entity Framework features if it helps to know.
回答1:
You shouldn't use application-embedded SQL Server express databases when running on AppHarbor. Whenever a new application version is deployed, any filesystem state is lost and you'll loose any changes to your database. Check out this guide on how to use the Sequelizer add-on: http://support.appharbor.com/kb/add-ons/using-sequelizer
来源:https://stackoverflow.com/questions/11836627/appharbor-connection-string