0

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?

2
  • Why not run IIS and database server locally if it's a learning exercise? Commented Sep 11, 2012 at 15:47
  • I wanted to learn how to get it working online :D Commented Sep 11, 2012 at 15:56

3 Answers 3

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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/…

8 Comments

well ideally I would like to use a local db (meaning stored on my hosting?). Would I still be able to update that as normal say through an admin panel where the admin can add and edit entries? This is ideally what I want to do
You could update the database as you would on your local environment; however, assuming you have controllers/actions/models/views to back up what you're trying to do.
I have a working prototype sort of thing which works fine on my computer through debugging. I published it and uploaded the files to the FTP but it did not seem to work online. This is what lead me to think I had to make use of a remote database.
Are you using Visual Studio? If so, you should use the Publish option since it will compile all the files for you.
|
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.