How to host mvc5 project with Database on Godaddy server - sql-server

I have 3 projects (MVC5 Web, Database and DB First EF) in one solution. I can host properly MVC5 simple app (not including database) in Godaddy server. I'm able to create DB in Godaddy server too (i.e. by creating scripts in local SQL Server MS in my pc and pasing in the Godaddy SQL Server. Its working fine.) and got Connection string. Now my question is,
1- Should I host my "DB First EF" ? If yes then how ?
2- Suppose I want to change my DB, how to modify my edmx file in server? (Like we do in Visual Studio When ever we modify any DB object, We can change our edmx manually.)
Any suggestion would be appreciate. Thanks in advance.

Related

Beginner in SQL Server 2014 Express, vb.net, cummon server ( Mass storage )

I developed an app with vb.net to update a SQL Server database.
The app is connected with SQL Server in my computer and seems working very well.
But my target is to put this database in the common mass storage to be updated with this app from 20 people (20 client PC).
My questions are:
how to do to install the database in the common mass storage?
should the SQL Server Express be installed in the 20 client computers?
how to connect the app to the database (located in the common server) using ADO.net?
Thanks in advance
It really depends. If everybody is suppose to use the same data I would look at putting up a sql server that everyone can access on the network. If the data needs to be used from computers outside of a local network I would look at getting a database from a web host. For these instances you would have to update the server to your connection string to the url of the new sql server. If everyone is using there own data it is ok to use there own sql express instance.

Publishing SQL Server database in Access to Sharepoint

In my project I need to publish an Access database into Sharepoint. I need to add a web form into it. Is it possible to add a WebForm that can be shown in the Sharepoint site, using ODBC(Database from SQL server on local machine)?
I can connect to that database and edit records in it. But I can't make a form with that web icon on it. Is that even possible to publish something from Access to Sharepoint using local SQL server and make a form to show data from it?
I found something like that:
I totally missed the fact that this was a web app. Access web apps
work with SharePoint, no other data source. That's true for Access
2010. But in Access 2013, there is a hybrid solution possible: Access Client + Access Web + SQL Server. It's still very new and not
common yet, and unfortunately there isn't a migration path from Access
2010 web forms to Access 2013 web forms. You have to build the web app
from scratch. But it's a better platform than Access 2010 offered.
that means i should use access 2013 ?
I am no expert and can't test my ideas, but I read that if you publish an Access db with Access tables to SP, Access tables will be converted to a SQL Server table by SP. Perhaps you could then delete or rename the SP created table on SP's SQL Server and create a view with the same name which points to you table on the other server ?
Have a look at the SP site: https://sharepoint.stackexchange.com/q/104005

Upload MVC4 site to server [duplicate]

This question already has answers here:
Uploading MVC site to server
(3 answers)
Closed 8 years ago.
I've developed website based on .NET MVC4.
I used simple membership .NET built in forms authentication.
I saw that the application uses some kind of MS database, but I don't really know what kind.
I want to upload my site to server and publish it.
Do I need to install some kind of database on the server? or I'll just need to upload the application and it will create the database on the server automatically?
Thanks.
The database created by default when using the MVC 4 Internet template is a SQL Server Express LocalDB, which is really intended for development and testing and not for deployment. Although I think some people do use it in production. If the correct components are on the server you are deploying to it will automatically create this database. If you look at the web.config generated by the template it looks something like this.
<add name="SimpleSecurityConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-SeedSimple-20130125152904;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-SeedSimple-20130125152904.mdf" providerName="System.Data.SqlClient" />
The name for the configuration string to use is defined in the WebSecurity.InitializeDatabaseConnection method as the first parameter. You will notice that the data source starts out with "(LocalDb)" which tells the runtime to use a LocalDB instance. I would recommend installing something like SQL Server Express or a full blown SQL Server instance on the server and changing the connection string to point to it instead for production.
You should explain more about state of your application database. At least you should let us see your working connection string(s).
If you have all your data in a single database - your own tables and the membership made tables - and your database is attached to a local database instance, you just need to generate a script from your current database and run that script on the database server of your web host.
Many scenarios exist according to the type of your application database (source) and the type of your web hosting database server (destination)...

Upload DBFile.mdf in App_Data to Azure

I have my ASP.NET MVC 3 project with a local database stored in /App_Data directory. This db is SQLExpress file (*-mdf).
I have my connection string working perfectly in my development CPU, the Connection String is:
data source=.\SQLEXPRESS;initial catalog=CFCBBSecurity;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\MYFILE.mdf;User instance=true" providerName="System.Data.SqlClient"
When I upload it to Azure, using VS 2010, all files are in the server, but the application cannot access the Database.
What should I do, change or update?
Thanks in advance.
The problem is that you're referencing a local SQL instance (.\SQLEXPRESS, the 'dot' stands for localhost). I'm assuming you are running SQL Server 2005/2008/2012 Express on your machine and that's why this works locally.
But when you deploy your application to Windows Azure, there's no SQL Server installed on that Web Role/Worker Role/Web Site (this would be a bad idea anyways because Web/Worker Roles are not persistent!).
What you'll need to do is sign up for a 'cloud database' like SQL Azure and use that. Or you could host it yourself in a Windows Azure Virtual Machine (which is IaaS, but this involves more work).
If you're building an MVC 3 application I would suggest you simply start with SQL Azure. Here is a tutorial: Running ASP.NET MVC 3 Applications on Azure (note that this tutorial contains screenshots of the old portal).

How can I Upload my ASP.NET website(with database)?

this is my first project ^_^
and I have no previous experience.
I did create the database in my project from within the MVC.
Add New Item > SQL Server Database
then I use ADO.NET Entity DataModel
and I don't need to open my connection each time I deal with the database.. it's only the connection string in the Web.config..
my question is :
how can I upload my database?
is there any resource for such beginner as me :$ ?
I did Google it but I found it very hard for me to know if this is what I want or not, that's why I came here :$
It really depends on what type of access you have to your server.
If you have remote desktop access then run remote desktop (mstsc in run) and connect to your server.
This article shows how to install your web application in IIS on server.
This blog post from Scott Guthrie shows you how to deploy your sql database to your server.
In case you only have access to your server via a control panel (plesk) you should still be able to do the same via a different interface. (you need to go through the instructions given for the specific control panel you are using).
Hope this helps.
For ASP.Net website, just upload all files using FTP, in wwwroot folder of your hosting.
For SQL Server database there are following option.
Attach your MDF file on hosting database server (if you have remote desktop).
Generate a script of whole database with full data, schema, and indexes etc. and run the script in query editor of your hosting panel.
First of all create a database from your hosting panel and a user for your database then Use SQL Serer 2008 (R2 most preferable) and connect with your hosting SQL Server using hosting server name in Server name, your db user id in User Name, and same for password. And then connect, you will find a long list of databases including your own database. Now right click on your database and import data from your local database server to remote database server.

Resources