Last post Oct 30, 2017 05:11 PM by Mikesdotnetting
Oct 27, 2017 12:45 PM|Marodo2712|LINK
I've created a very simple website in vs2010 with a ASPNETDB.MDF db (basically the starter site you get when you create an asp.net website, and you get the 'My Asp.Net Application' Default.aspx.)
I can copy all the files, incl the app_data folder etc, using the Copy Website tool, but, whereas when I interact with the locally hosted site it works fine, when I try to register etc on the remotely hosted site it just returns a whole bunch of errors.
So, how do I copy this to my windows hosting package, such that it works on the internet?
MSDev windows hosting
Oct 27, 2017 12:55 PM|Mikesdotnetting|LINK
If you are using a SQL Server database (mdf file), that needs to be attached to a SQL Server to work. If SQL Server is included in your hosting package, your hosting company should provide instructions on getting your database to work. If you haven't got
SQL Server included as part of your plan, your database will not work.
[EDIT] Just had a look at the error. It is SQL Server-related. You need to check with your hosting company as I said before.
Oct 27, 2017 02:29 PM|Marodo2712|LINK
I've contacted the hosting service and asked them to explain to me how to do it. They have a page called "How do I Publish my Microsoft SQL server database" where they say I need to download and install the SQL DB publishing wizard and SQL Management Studio,
I've also installed SQL server Configuration Manager and a bunch f other stuff. the instructions say that I should run the wizard then go to management studio, but I can't even get through the first part as it return an error. (see here
How can it possibly be so complicated to get, what is essentially a notepad document, onto a remote server? Is this how every website with an MSSQL db gets deployed?
Oct 27, 2017 05:05 PM|Marodo2712|LINK
I received the following response:
"The web servers do not have SQL Express installed so a local db in that format is not supported. We provide full sql sevrer databases running on SQL Server Standard which need to be created in your control panel. Once created you can deploy your local
database to that server either by backing it up locally and restoring that to the server, or by using Web Deploy from Visual Studio.
The connection string should then be updated to use the remote sql server with the format
Is VS2010 compatible with this?
Oct 30, 2017 02:37 AM|Jean Sun|LINK
Please try install the SQL Server Express on your hosting server. You can download the installer from the following link.
Local DB is created specifically for developers. It is very easy to install and requires no management, yet it offers the same T-SQL language, programming surface and client-side providers as the regular SQL Server Express. In effect the developers that
target SQL Server no longer have to install and manage a full instance of SQL Server Express on their laptops and other development machines.
It's recommend that move the localDB to SQL Server when you want to host the website on the production server.
Copy the created .bak to your target machine
Install SQL Server on your target machine if it's not installed previously
Do the opposite operation Restore on your target machine 1) Open SQL Server Management Studio, in Object Explorer, select Databases, then right-mouse-click, select Restore Database, open Restore Database dialog
2) Give a name to To Database 3) Under Source for restore, choose From device, then browse to your copied .bak file, then click OK
Oct 30, 2017 05:08 PM|Mikesdotnetting|LINK
Please try install the SQL Server Express on your hosting server.
Oct 30, 2017 05:11 PM|Mikesdotnetting|LINK
you can deploy your local database to that server either by backing it up locally and restoring that to the server,
1. Take a backup of your current db
2. Upload the .bak file to your hosting environment (the host should tell you where to put it)
3. Create a new empty db on the hosting server
4. Restore the new database using the .bak file as a "device". Make sure you use the Replace option. That will overwrite the empty db with your uploaded one.