ASP.NET MVC Deployment to azure - asp.net-mvc

So I'm trying to deploy a test site to Azure.
The site has a database which was built in SQL server management studios, then I used ADO.NET Entity Data model to import the database into visual studios. Then I just used scaffolding to create CRUD operations.
How do I deploy this web app to Azure?
I used a database first so I'm not sure if that's a problem
I've tried following some tutorials but they seem to have different UI
eg. https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/database-first-development/publish-to-azure

First you want to go into Tools in your nav menu and check for 'Get Tools And Features'. Make sure you have Azure tools installed, and from there you'll be able to access the Azure menu to publish your web app directly from Visual Studio. You can also do this in VS Code, however you'll need the official Azure extension from Microsoft.

Related

How can i get back asp.net code from azure web app?

I had published my application on azure web app and by mistake deleted the repository. Now how can I get back my code from the Azure web app? I had to try kudu but it's given an understandable format. the app in asp.net core.
For now if you want to download the web source code, you could go to the kudu site, Select Debug console -> CMD from there you can go inside site -> wwwroot and select download.
However note that this is the deployed code, and it won't be the source if you are using a compiled language such as C#. When you publish from visual studio or any CI tool the files gets published in compiled form.
The option is you can use github deployment to maintain repository which contains all source file.

How can I remove all azure integration from my visual studio templates?

I never notests this but if you create a new asp.net MVC website in visual studio you get full azure integration without knowing it. Turns out all of my applications, while hosted on my own server, are logging everything they do with Azure.
If I remove all azure dependencies from my project it won't build anymore. Is there a way to remove this feature from my asp.net project template? I really don't like this, for one, my inbox is exploding with "Data collection for .... has reached it's daily cap" emails and two, I feel violated in my privacy, why does Microsoft have know everthing of my projects?
Sorry for the possible duplicate question, but Google really isn't my friend on this one.
Actually, when you create a new project with default options you don't get any Azure integrations.
If your application is with Azure AD authentication, you should disable this when creating the new project.
If your application is doing logging on Azure, you can disable Application Insights.

Pre-compile MVC web project with Razor views on Azure

How to precompile MVC web project (with all Razor views in it) and deploy it using the standard Visual Studio Azure Publishing tool?
There is no option for me now to use any other Azure deploying tools which could allow to enable this option like it's already exists in local "File System" publishing.
Already read many articles but there doesn't seem an easy way to do it!
Any help?

Can a existing MVC2 application migrated to Azure Cloud Service Project?

Currently I have MVC2 web application(on going). If I'm to use Azure PaaS (Platform as a Service), Can I use the existing project. Or should I create new project (using Cloud service project template)? Can it be migrated? And what kind of effort will it take for migration? Or should I rewrite the entire application with new project template?
You don't have to rewrite the project itself, you can simply add another project to your solution (which is a cloud project) and then point it to your other project in the associated definitions.
This is a useful technique when you already have existing projects that you want to migrate to Azure.
Not sure if this would work with MVC 2 web application but you can simply try to convert the web application to Cloud Services project by right clicking on your project in Visual Studio (I used VS 2013), then Convert context menu and then selecting Convert to Microsoft Azure Cloud Service Project.

What should I store/ Not store in TFS and how?

I'm trying to set up a TFS server for our small dev team, and since this is fairly new to me I have a couple of questions.
1) We are developing ASP.Net websites for internal use (intranet etc), these websites currently are not saved with visual studio solutions, they get saved basically as they are on the server and we just update them using Visual Studio by doing file > open website.
So my first question is should I save these as solutions in TFS? What would the benefit of this be?
Im coming from a background of developing WPF applications and have always seen everything saved with a solution in TFS.
2) What should we store in our TFS repository (and what should we exclude)?
At the moment I am storing source code & Documentation but is it really appropriate to store things like installers for VS plugins / small applications or should this kind of thing all be placed on a server someplace?
So my first question is should I save these as solutions in TFS? What
Yes, you could create a solution containing the different ASP.NET web applications.
would the benefit of this be?
Your source code will be version controlled
What should we store in our TFS repository
Source code, third party assemblies that your ASP.NET applications might require, script files, basically everything that allow to get your site up and running. Documentation should also be stored along with the project. Same stands for installers (the source code only, not the MSI) if those installers allow to deploy the ASP.NET application on the live servers.
and what should we exclude
Compiled assemblies, but they are automatically excluded by TFS anyway.

Resources