I have uploaded the website files using the publishing wizard in Visual Studio. I used FTP to transfer those files. Now I'm not sure how to get my databases hooked up.
I used Code First Migrations in Entity Framework for my databases. I have three databases in my project that have been stored locally. I am trying to add them through cPanel. HostGator is the provider.
I have created 3 MySQL databases in cPanel, but I'm not sure where to go from there and I'm having trouble finding information online.
here is how you can create the DB in code first migration:
https://stackoverflow.com/a/16322232/2072676
hope it helps
Related
I have a visual studio asp.net web application that uses entity framework to connect to the database. I follow this tutorial http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in-an-asp-net-mvc-application, and enable code first migrations. It connects to local sql server fine and the development is ok.
When I publish this application, I have to use a mysql database. I can't run code first migrations on this database.
I have two problems:
I want to use mssql database in development, and mysql database for production, how do I specify two different configs for that?
If I follow this tutorial http://www.codeproject.com/Tips/788357/How-to-set-up-application-using-ASP-NET-Identity-w, to setup mysql, how do I switch back to mssql for my development?
You need to specify two different web.configs. One for dev and one for prod. See this link on how.
I have a website built with ASP MVC5.
Also I use Entity Framework 6 with Database First approach and edmx.
On production I already have database with a lot of data.
I'm using TeamCity for CI and would like to perform auto deployments.
I found Web Deployments and also tried to configure Publish profiles.
But 1 have some questions:
1. What about database? how to migrate, upgrade schema and data automatically? Are there any tools for that?
2. Could you describe how publish via Web Deploy works? I see connection string definition, etc. How it copies files to remote box, and how applies DB (schema, data migration?)
3. Also I configured IIS website for FTP upload deployment. How it connected with previous cases?
Ive been working on a project on my computer and i want to transfer it to my laptop. The project is an ASP.Net Website Project in C#. I'm using SQL Server 2012 to hold my database and the Asp.net user management tables in my database also.
What's the easiest way to do this, as i have backed up my database and copied the ASP.net website folder onto my laptop and changed data source, but I'm getting a few errors, especially on the asp.net configuration page it has also removed my roles due to the transferring.
If i understood you correct, what you need is to deploy the ASP.NET Membership Database to the new project location. There are set of tools and commands that you need to use.
You would need to construct a command-line like the following:
C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync
-source:dbfullsql=" [your connection string] "
-dest:dbfullsql="c:\temp\InsertIntoAspNetDB.sql
Again the exact path and command will depend on your local configuration.
You may get more detailed information from MSDN - How to: Deploy a Database With a Web Application Project
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.
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
I currently have an ASP.NET MVC 3 project, plus a class library project, that I am planning on open-sourcing. Before I do that though I want to clean up the project a little bit. One modification I want to make is with the database. Currently the site is published to a shared hosting server and I setup the SQL database on that server. However, since people will be forking the project and running it locally I'd like to just attach a SQL server express database or something that is part of the project. I want people to clone the repository, open the project, press F5 and have it run. Currently they'd have to setup a SQL database and create all the tables and stuff.
The solution consists of two projects: MvcUI and Domain. Domain is where all the application logic occurs. In fact, the domain is UI agnostic which means that it could be consumed by a desktop application just as easily as it could be by a web application.
I would like the database to be part of the Domain (class library) project. I have never done this before. If anyone could provide a simple explanation for how I would need to go about setting this up I would be thrilled. It would be very nice to have the database just be a in the solution because I could pre-populate it with some basic data. What do I need to do to get this database in my project as a database file or what not?
SQL Server Compact Edition is a portable SQL database that should do exactly what you are asking.
Microsoft SQL Server Compact 4.0 is a free, embedded database that
software developers can use for building ASP.NET websites and Windows
desktop applications. SQL Server Compact 4.0 has a small footprint and
supports private deployment of its binaries within the application
folder, easy application development in Visual Studio and WebMatrix,
and seamless migration of schema and data to SQL Server.