appharbor connection string

眉间皱痕 提交于 2020-01-11 13:08:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!