Copy websit to commercial hosting RRS feed

  • Question

  • User-2111988298 posted


    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

    websitepanel v1.2.0

    Friday, October 27, 2017 12:45 PM

All replies

  • User-821857111 posted

    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.

    Friday, October 27, 2017 12:55 PM
  • User-2111988298 posted

    Thanks Mike,

    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 http://www.inventec.co.uk/img/DBWizard.PNG)

    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?

    Friday, October 27, 2017 2:29 PM
  • User-2111988298 posted

    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

    Server=sql11.hostinguk.net;Database=myDataBase;User Id=myUsername;


    Is VS2010 compatible with this?

    Friday, October 27, 2017 5:05 PM
  • User1771544211 posted

    Hi Marodo2712,

    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.

    1. Backup your database from original machine  1) Open SQL Server Management Studio, connect to your (LocalDb), select your database then right-mouse-click, choose Tasks -> Back Up ...    2) Remember the Destination path in Back Up Database dialog, then click OK
    2. Copy the created .bak to your target machine

    3. Install SQL Server on your target machine if it's not installed previously

    4. 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

    Best Regards,


    Monday, October 30, 2017 2:37 AM
  • User-821857111 posted

    Please  try install the SQL Server Express on your hosting server.
    The OP is using a hosting service. They cannot install stuff on their server.

    Monday, October 30, 2017 5:08 PM
  • User-821857111 posted

    you can deploy your local database to that server either by backing it up locally and restoring that to the server,
    I keep meaning to blog these steps, but they are:

    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.

    Monday, October 30, 2017 5:11 PM