Jpin
Jpin

Reputation: 1547

MVC 3 C# - Deployment and MYSQL Database

Visual Studio 2010 - C# - MVC3

I am completely new to ASP.Net and I have been working / practising making an MVC 3 application using C#. I have practised getting an MVC application online which makes use of no databases and was successful. My hosting supports .net 4 and it was a simple process of publishing the files and uploading to my FTP. I am making a new application which makes use of a database. I have set up a data connection in the server explorer and set up all my tables and relationships. Everything is currently working as intended and I can create, edit and delete entries from the database.

I am not really sure where to start with getting this online. My hosting offers no MSSQL databases so I am presuming I can use a MYSQL database? What is the process of changing my application to use a MYSQL database which is located on my remote hosting? Also I am making use of the default accounts where users can register and login, will I have to set up a database for this too?

Upvotes: 0

Views: 762

Answers (3)

user1477388
user1477388

Reputation: 21430

You can use a local DB in your APP_DATA folder or you can connect to a remote DB. Please let me know if you need additional help in either of these two areas or if I have misunderstood your question. You may also want to encrypt your web.config file to secure your DB passwords better.

From our chat:

Try this stackoverflow.com/questions/…

Upvotes: 0

Adam Tuliper
Adam Tuliper

Reputation: 30152

SQL CE supports binary deployment, meaning your hosted doesn't have to have anything installed and you get SQL support, however no stored procedure support (if that matters to you here) In addition you can install the SQL Compact Toolbox into Visual Studio http://sqlcetoolbox.codeplex.com/

See: http://blogs.msdn.com/b/webdev/archive/2011/01/06/how-to-bin-deploy-sql-compact-edition-4-0-and-razor-web-projects.aspx

Upvotes: 0

BBQ
BBQ

Reputation: 618

Your host offers mysql hosting? you will need the mysql .net connectors.

also check this next out for the asp.net membership, mvc uses

http://dev.mysql.com/doc/refman/5.1/en/connector-net-tutorials-asp-roles.html

Upvotes: 1

Related Questions