Visual Studio OWIN Self-hosted App deployment - visual-studio

I've got an OWIN Self-Hosted SignalR app. I'm looking for a way to automatically deploy it to a different server (one is local, one is in Azure cloud) from Visual Studio. I'm not using IIS, I want to run it either as a normal app or as a Windows service.
What are my options?

I advise you to consider using TopShelf
and here is the Nuget Package
All you need is to build and deploy the bin folder then just run one command

Related

How do I deploy continuous azure webjob using Octopus deploy

I am trying to get an Azure App Service to recognize my Web Job - meaning to show it in the portal under "Web Jobs" in the App Service. And to also run it on the schedule defined with a TimerTrigger attribute.
It is a .NET Core 2.2 Console Application with multiple web job classes in it. The App Service it runs within is a separate project and web site. I am able to publish it from Visual Studio and it shows as it should under Web Jobs in the Web App. But if I delete it and try the publish from Octopus to the same place WITHOUT doing the VS 2017 publish first, it won't show up.
My issue is that in a new environment, the Web Job does not get created when I use Octopus to deploy the Web Job files as described here:
http://blog.amitapple.com/post/74215124623/deploy-azure-webjobs
by setting the physical path in my Octopus package deployment:
App_Data\jobs\continuous\myjob
This is the same path as when I publish from Visual Studio 2017.
Related to this question, but there seems to be a step missing since the files are in the right place, but the web job does not appear in the portal.
How to deploy azure webjob using Octopus
Is there some additional ssetup or registration step for the Web Job to run or should the App Service just recognize the web job is there when the files appear in the correct place? Restarting the app service does not help.
Since you have a web app along with a web job, I would follow the steps outlined at https://octopus.com/docs/deployment-examples/azure-deployments/deploying-a-package-to-an-azure-web-app/deploying-web-jobs. You can build your project using .nuspec to get your .npkg and push/upload the package to Octopus.
Hope that helps.

Deploying .Net Core WebAPI project on IIS

I have created a simple web API using .Net Core and trying to publish it to IIS. But getting HTTP 500.
I followed https://docs.asp.net/en/latest/publishing/iis.html article and did exactly whatever mentioned in that.
I Installed only https://www.microsoft.com/net/download as
DotNetCore.1.0.1-WindowsHosting.exe OPT_INSTALL_REDIST=0
NOTE : I am able to deploy and access MVC application successfully but cannot access WebAPI application with the same steps.
In the IIS logs i am seeing below error.
Failed to start process with commandline '"dotnet" .\Project-1.dll', ErrorCode = '0x80070002'.
I am using the default web api template provided in Visual Studio 2015
am i missing something. Is WebAPI deployment is different to MVC app deployment w.r.t .net core ?
When you install the .NET Core Windows Server Hosting bundle, it won't restart all of the IIS processes if IIS is currently running. This is a good thing, since on a production server you wouldn't want them just to restart, but it would be nice if it was made a little clearer. First, check your System (not User) PATH variable to ensure that the path to Dotnet is there. Then, go into services and restart the Windows Process Activation Service. This will restart all of the IIS bits and get it to update the path. Once you've done this, IIS should serve up your .NET Core app just fine.

How do I deploy an existing web app project to Azure using Visual Studio but no Azure Emulator?

I have an existing project with three web apps (two web API and a front end). I would like to deploy to Azure all three with a single click of Publish using the Publish Web wizard.
I installed the Azure SDK and tried to create a new Cloud Service, but this install the VMs and the storage emulator, that I don't need at all and slows down my PC.
I tried with Azure Resource Group to add to an existing project, but the Deploy button remains disabled, like it failed to connect to the web site project.
What is the recommended way to do this?
I am using Visual Studio 2015
Thx.
You do not need to install the emulator for the deployment to work, just download the parts you need from http://www.microsoft.com/en-us/download/details.aspx?id=48178 (assuming you want SDK 2.7).
It's not really clear from your question if you want to deploy a Cloud Service or a Web App. If you want to deploy a Cloud Service, you can add all 3 projects as roles and they will all be published within a single deployment (just one click to Publish). But, if what you want is to deploy them as web apps, you will need to do it in 3 different apps, which means 3 clicks to publish.

How to Deploy On-Premises with Visual Studio Online Continuous Delivery

My team uses Visual Studio Online ("VSO") to manage our ALM.
We already have a push-button build-process in place to build code from our local Git repo (remotely) and deploy it to a Microsoft Azure Website on Azure.
In addition to this we want a local, development-testing environment built and deployed with a push of a button.
What is the best way to integrate an automated, on-premises development-testing deployment into our development pipeline from within VSO's ALM ecosystem?
[We do also own TFS 2012 -- is there a way to leverage it from VSO to drive an on-premises build deployment from our VSO git repo?]
To deploy builds on-premise, I installed an on-premise build server and used it as the default build controller in my build definition.
When installing the build server select your Visual Studio Online url to point the build server to your team project collection.
I used the instructions here
http://myalmblog.com/2014/04/configuring-on-premises-build-server-for-visual-studio-online/
(normal issues when installing a build server remember to copy over your MSbuild folder from a machine with Visual Studio already installed etc...)
I know it's been a while since the question was asked, but this guy did it with an extension to be added to your VSTS account to deploy directly to an on-premise IIS. I'm going to check this solution today but I'm pretty sure it will work.
https://blogs.msdn.microsoft.com/monub/2016/01/20/visual-studio-team-services-release-management-iis-web-deployment-vnext/
UPDATE
Better yet, MSDN released a complete doc for deploying an asp.net app on IIS
https://www.visualstudio.com/en-us/docs/release/examples/other-servers/net-to-vm

deploy mvc 3 site to azure using custom build script

Every example I've seen on how to deploy an MVC application to Windows Azure is using the Visual Studio Publish tool, my problem is that my application is deployed with a custom msbuild file (.proj).
I cannot change the way it is deployed, so is there a way to deploy to azure without publishing? Something like copying the directory result of my custom build to some azure directory.
Thanks for letting us know that it is for Windows Azure Web Role. You can use Automated Build and Deployment with Windows Azure SDK 1.6 blog to deploy directly from ccproj file. Even if it is written with SDK 1.6, you sure can use exact details with SDK 1.7 as well.
You can also take a look at Using MSBuild to deploy to multiple Windows Azure environments blog as well.

Resources