Deployment of ASP.NET vNext Application to Azure Cloud Services - asp.net

Is it possible to deploy an ASP.NET vNext web application to Azure Cloud Services? And if yes, does it matter if it's build on the aspnet50 or the aspnetcore50 framework?
The Azure Cloud Service Visual Studio template, even in 2015 CTP seems to support only .NET Framework 4.x.

It's not supported yet but if you really want to you can do something like create a worker role setup script (which installs the kvm, kre etc.), then follow steps like this http://www.codeproject.com/Articles/331425/Running-an-EXE-in-a-WebRole-on-Windows-Azure to run it and bootstrap your aspnetcore50 app. It's not pretty or easy but it's the only way to run ASP.NET 5.0 stuff in a worker role at the moment.

Related

.NET Core 5.0 Console with WebAPI

I once build a .NET Core Console App that contained a web host, so I could make controllers without using IIS. Isn't that possible in 5.0?
I need it to run as a service later. It used to be so easy :-)
I can't find any guides to that, but I can find guids addressing version 2.1.
Latest .NET Core project templates (and .NET 5 ones) use Kestrel by default.
You can find the related documentation here.
You can also find here specific documentation about running ASP .NET Core as a service in both Windows and Linux, and in the case of Windows, with and without IIS.

How do I Build and Publish .Net Website using Azure DevOPs Pipeline

Is there support for building and publishing a .net Website (not a webapp) in Azure Devops?
How do I Build and Publish .Net Website using Azure DevOPs Pipeline
The short answer is yes.
Azure DevOPs support configure continuous integration (CI) and continuous delivery (CD) for .NET core or ASP.NET application, the ASP.NET application including the ASP.NET web site.
There is a template ASP.NET, which you can use it to build the website project (Adjust your tasks as needed):
Check this document Continuous Integration Using Azure DevOps Pipelines And .NET Project for some more details.
Hope this helps.

Visual Studio - deploy existing website/webAPI to Azure

In my VS(2015) solution, I have a ASP.Net website and a WebAPI project. For normal development, I want to use IIS on local machine for dev/test. However, I also want the option to be able to deploy the same sites to Azure on demand.
I know I can 'Convert' an existing project to Azure project from VS. But then it'll become a cloud project only. I don't want to convert it to cloud project.
Is there a way I can use my existing projects in VS and deploy/publish them to Azure?
Thanks
You don't need to "convert" your project to an Azure project, you can simply create a publishing profile in Visual Studio and push the build to Azure.
The Microsoft documentation explains how to do this, follow the steps from the "Publish to Azure" section onwards.

Can I use .NET 4.6 for main domain and .NET Core for api

So I've developed a standard .NET 4.6 CRUD app that adds / edits / deletes data in a SQL Express database and is hosted on Azure. This will only be used by a couple of people to manage data for the main project which will be a one page Angular / mobile app. The next step is to develop an api (with .NET Core) so the data can be consumed by the Angular / mobile app.
What I'm wondering is if I already have the main CRUD app created with .NET 4.6, can I create an api in the same domain using .NET Core? Something like this:
mydomain.com - .NET 4.6
mydomain.com/api - .NET Core
Sure you can do this, you can also run a node.js app on mydomain.com/api_js for that matter, it's all about how do you configure your web server.
If it's a question how to configure the web server, you need just to google about your particular web server.
If it's a question if that makes sense - in my opinion yes, MS is putting now so much effort in being multi-platform, that my bet would be on the .NET Core being more future proof.
Only you have to keep in mind, that it won't be a simple reference adding to reuse the code, as it's not possible to reference .NET 4.x assemblies from a .NET Core project.
But it's possible the other way around, so you can abstract away the code you want to reuse from your .NET 4.6 project into a shared .NET Core assembly, which than may be referenced by both projects.

Enable .NET 3.5 Features in Azure Cloud Service

I have an application built using .NET Framework 4.5 deployed in Azure Cloud Service. So I use Windows Server 2012 OS Family (supports .NET 4.0 and higher). My application is referencing a tool that can only be run with .NET 3.5 features enabled. So I login into the remote desktop and enable .NET 3.5 features.
I read this article Windows Azure Execution Models stating that "a Cloud Services application shouldn't maintain state in the file system of its own VMs. Unlike VMs created with Windows Azure Virtual Machines, writes made to Cloud Services VMs aren't persistent;"
Do you think my changes in the server (enabling .NET 3.5 features) is not ideal? If yes, can you suggest of a way on how can I deploy a .NET 4.5 web application with .NET 3.5 feature dependency.
Do you think my changes in the server (enabling .NET 3.5 features) is
not ideal?
Yes if you're doing it manually via RDPing into the server. Because if for some reason your VM goes bad and Microsoft replaces that VM with another VM, your changes will be lost.
can you suggest of a way on how can I deploy a .NET 4.5 web
application with .NET 3.5 feature dependency.
Do take a look at Startup Tasks to install additional dependencies. They get executed when your role starts so you could enable the features (or do any software installs before the role starts). I haven't tried enabling the features personally (so I may be wrong) but take a look at this blog post which talks about installing these features through PowerShell or Command Line: http://blogs.msdn.com/b/sql_shep/archive/2012/08/01/windows-2012-and-net-3-5-feature-install.aspx

Resources