Advice on creating a local instance of Azure Website - visual-studio

I have, I admit, done things the wrong way round and created an Umbraco installation on Azure, developed multiple websites on that installation and only just decided I want a local instance for further development purposes.
Given that that's where I am, does anyone have any advice for how to go about achieving this? I have tried installing Visual Studio Community 2017 and MS SQL Server 2017 Developer and while I can connect to Azure with Visual Studio I don't seem to be able to work out how to view the installation, much less copy it down to my PC (something which I my searches seem to suggest isn't possible with Visual Studio).

I think you will need to copy down the site via FTP and the database using SQL Server Management Tools (assuming you are using SQL Server and not SQL CE).
You can get the FTP connection information from the Azure portal. The web root is in /site/wwwroot. Copy it down locally and you will be able to open it in Visual Studio as a Web Site. For the database, you can connect to the Azure SQL database with SQL Server Management Tools (you should have the connection info from when you created the database) and then right click on the database, select "Tasks" > "Export Data-tier application..." which will allow you to save a 'bacpac' file your local machine. You can then connect to your local SQL Server instance, and then right click on the "Databases" node in the Object Explorer and select "Import Data-tier application..." Once the database is imported, you may need to create/update a SQL Server user and grant it access to the database you just imported. For local development I just set the user to be owner of the the db. Back in Visual Studio, you should update the "umbracoDbDSN" connection string to use the new local database. At this point you should be able to run the website locally.

Related

How do I connect Azure SQL to Visual Studio?

I’m doing a project for school that requires building a function IT project. I’ve got the HTML, CSS, and SQL parts down pat. It’s the combination in Visual Studio 19 Mac that isn’t clicking for me.
How do I go about connecting my existing SQL database to my Visual Studio project?
Check out https://learn.microsoft.com/en-us/azure/azure-sql/database/connect-query-content-reference-guide. This reference guide will point out how to obtain the connection string for your Azure SQL Database. You can use this connection string to add a connection via the SQL Server Object Explorer, (Ctrl+, Ctrl+S) in Windows, I assume it's (Cmd+, Cmd+S) on Mac, to be able to query your database from inside Visual Studio.
The Add Connection diaglog will allow you to add your IP to the Firewall which is needed to access the database/server. This principal works the same for local network databases. Make sure you choose the correct Authentication type, e.g. Azure AD for Azure SDL, Windows for local network SQL Servers if so properly configured. You can always use SQL Server Auth for either one.

Setup a local TFS/TFVC repository in VS2015

I want to create a new project in VS2015 and set it up to use TFVC instead of Git.
I changed the source control plugin to Visual Studio Team Foundation Server from Tools->Options->Source Control->Plug-in Selection, and I created a new project with "Add to Source Control" checked, but the project is still created with a Git repo.
I also tried adding a server connection from Team Explorer->Manage Connections->Servers...->Add..., but there was no server at http://localhost:8080/tfs (I assume it's not install by default).
My question is how can I work on a TFS repository that is local to my computer (it's OK to use a server so long as it's on localhost).
You have to install Team Foundation Server on your local computer.
This is a separate download and not a part of Visual Studio.
According to the system requirements, TFS (starting with 2013) can only be installed on a 64-bit OS. You don't need to install SharePoint or any other part of TFS that you won't use (like for example Build Services).
You also need an instance of SQL Server running on your local computer. TFS will create a bunch of databases on this instance where it stores its internal data. If you don't have a license for SQL Server, you can use the Express Editions of TFS and SQL Server both for free. These Express Editions are recommended by Microsoft (see previous links) if you plan to use TFS only on you local computer, but of course you can use a paid edition as well if you need some special feature.
After installing TFS you have to create a Team Project Collection in the TFS Administration Console which can be found in the Start menu. Then add a new connection in the Team Explorer as shown in your screenshot and create a new Workspace (Source Control Explorer --> Workspace --> Add) with a Working Folder that matches the local directory containing your source files.
The URL of the TFS is the one that was set in the Application Tier of the TFS Administration Console. (http://localhost:8080/tfs is the default URL.)
As far as I know it's not possible to use a TFS/TFVC without installing and configuring a full Team Foundation Server reachable by a URL, but of course anything can be limited to be usable only on your local computer.

Error after restoring TFS database to new hardware

I am using TFS 2012. I wanted to test how i can recover from server failure or any hardware failure, So i wanted to shift TFS to new PC.
I followed some articles to restore it. what i did is
1)I had full backup of TFS_configuration and all other collection database.(backup taken using TFSbackup.exe)
2)In new PC i installed all the softwares(such as TFS 2012, sql server etc).
3)created all the windows user account as in old server.
4)When I checked the New PC it had default collection created which was mapped to sql server which i installed.
5)Now i deleted that default collection and restored all databases of my old TFS server(TFS_configuration and all other collection database.)(backup restored using TFSrestore.exe)
6)Now when i checked TFS administrative console it had all the collections as my old server.
7) But when i click on Administrative security, group membership etc I get error like
TF30046: The instance information does not match. Team Foundation expected 368f7830-1c67-4c4c-8bc4-ba3d5b5a5543 which was not found. Please contact your Team Foundation Server administrator.
In this link it was mentioned to change service host id in table. But it didn't work for me.
So please help
You mistakenly configured TFS (in fact it created a default collection). If read carefully Move Team Foundation Server from one hardware configuration to another, you have to run the AT-only Configuration Wizard after restoring the databases.

Install sql server express database engine only

I am deploying a wpf application that requires sql server 2008 as a prerequisite. As a result I am embedding the sql server installer in my application. When that launches the SQL Server Installation window shows up:
I don't want the user to have to go through out this installation. That program will install SQL Express and many other things like SQL Management Studio.
Is there a place where I can download SQL Express 2008 the database engine only? so that the user will just have to click next, Agree, Ok... etc... without having to make complicated decisions. Or maybe is it possible to install sql server express throughout the command line?
I am including the installer in my application because my application is supposed to be able to be installed without having an interenet connection. Also I cannto seem to find a place where I can download SQL Server express the database engine only.
Go here and download the appropriate version of SQL Express. Then see the How to: Install SQL Server 2008 R2 Using a Configuration File article on MSDN. Note that after you generate the config file for the installation, changing the following keys in the config will probably be of particular interest to you:
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only without any user interaction.
QUIETSIMPLE="True"
; Automatically accept the license terms
IAcceptSQLServerLicenseTerms="True"

Publishing a SQL Server Database project

I've created a SQL Server database project that correctly deploys a database on my machine. However, I need this project to create databases on QA's machine. They do not know how to create a database from a script.
Is there a way a database project in Visual Studio 2010 can be published so all a non-technical user has to do is click an executable and the database will automatically install?
What you are looking for is this MSDN article: Deploying a Database by Using the Database Publishing Wizard.

Resources