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.
Related
I uploaded my website to GoDaddy web hosting and the database is placed on another server.
I want to create an API - either REST or SOAP - to connect my web site with my SQL Server database.
I need help - how can I create an API in ASP.NET MVC 5 so that I can connect my database with my web site? Kindly provide me with a link or code so that I can solve my issue.
I have never worked on API before - any help will be much appreciated.
ASP.NET MVC is now old school. Try ASP.NET Core.
You need to design and develop an N-Layered application: Data, Service and UI.
It doesn't matter where the database server is sitting, as long as your WebAPI can connect to it.
I suggest you build a restful web api with asp.net core :
https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-3.1&tabs=visual-studio
Put your db connection string in the app settings file.
Although you use other database server, it doesn't matter. You just need to make sure you check your connection string and point it to your database server. For publishing method, it is same, you can use FTP or Visual Studio
Please open your project with Visual Studio tool
On the Solution Explorer windows (which is normally located on the top right hand corner of the VS tool), right click your project and select Publish
Please kindly publish it to a local folder, such as C:\Project
Please just upload whatever files/folders you see on C:\Project to your server via FTP
If you have any problems, you can contact your support team
You can get the Reference from
Sample_WebAPI_Project ,
instead of Using List created you can create Database Connection and get data from Database
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.
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
Here's the scenario:
MVC web project
Three MS SQL Server database projects
One of the databases must be populated with lookup tables
Other tables are user data and don't need data uploading
GoDaddy hosting
Visual Studio 2013
I'd like to deploy everything (web project, sql schemas, reference data) to GoDaddy in one fell swoop, but they appear to only offer FTP uploading. When using FTP in the Web Publishing Wizard, it says "Database preview not supported for this method" which I'm taking "method" to mean FTP. I can publish the web project fine in FTP, but of course without the databases the web application generates errors.
So here are my questions
There is a "Web Deploy" publish method listed in the wizard, but GoDaddy has no information on how to set this up. Can this be used with GoDaddy and will it publish DBs also?
How does one configure the project to use the local SQL Server when running on localhost, but when deployed it uses the GoDaddy SQL Servers?
Can the data in the local DB be uploaded as part of the publishing wizard process, or is SQL Server Management Studio the tool of choice?
Thanks!
I don't believe GoDaddy supports WebDeploy. They didn't when I left their service a few years ago. You can talk to them to confirm whether this has changed.
This is the role of Web.Config Transforms. For an intro to the topic, see here; the article is a little out of date and doesn't mention one of the most useful points - you can add transforms for each publish profile, so they're applied according to your publish settings.
You probably can't upload the local DB file. In almost every hosting situation, the SQL server and the web server are two separate machines, and don't share any files (corollary: the web server doesn't have the SQL service installed). One workaround you can try is to publish the DB directly from your own machine. That is, if you can connect to the DB from your machine, you can do a Web Deploy publish to your own machine but it will send the SQL changes to your GoDaddy DB server.
A more advanced workaround for #3:
Set up your FTP publishing settings for your files
Figure out how to publish your DB through WebDeploy only/from the command line (you can refer to here for a sample using WebDeploy from the command line; note this is going from GoDaddy -> Local, but it's trivial to turn it around)
Customize the web publish pipeline to insert an MSBuild target to execute your WebDeploy command line (see here for an example of modifying the pipeline; you can add the target directly in your .pubxml file if you're not intending to use it for multiple projects).
This will give you a single publish profile which will separately publish your files (via FTP) and your DB (via WebDeploy).
I've been developing a site using ASP.NET MVC, and have decided to use the new SQL Server 2008 FILESTREAM facility to store files 'within' the database rather than as separate entities. While initially working within VS2008 (using a trusted connection to the database), everything was fine and dandy. Issues arose, however, when I shifted the site to IIS7 and changed over to SQL authentication on the database.
It seems that streaming a FILESTREAM doesn't work with SQL authentication, only with Windows authentication. Given this, what is the best practice to follow?
Is there a way to force this sort of thing to work under SQL authentication?
Should I add NETWORK SERVICE as a database user and then use Trusted authentication?
Should I create another user, and run both the IIS site and the database connection under this?
Any other suggestions?
Take a look at this article. I don't know a whole lot about FileStreaming and security, but there are a couple of interesting options in the FileStreaming setup such as allowing remote connections and allow remote clients to access FileStreaming