I'm new to deploying a web app to Azure (using Azure App Service). My app has about 6 web projects and we also use Umbraco CMS. When I build the web app in Visual Studio and point to any of our databases (dev, stage, etc.), the web site works locally (localhost)
When I try to publish the app to Azure or even test it locally (after "convert"), content is missing and all the links have the incorrect domain. I'm following MS docs to "Migrate and Publish a web app to Azure Cloud".
The first step in the MS docs is to right-click on the web app and select "Convert > Convert to Microsoft Azure". After this step I try to test the Web App created by this step. I point to the same databases as if i build locally (not using "convert"), content is missing and links have a different domain.
Is there a settings in the web.config or other file I need to do when building/deploying to Azure cloud service?
Related
We have a App Service Enviroment https://learn.microsoft.com/en-us/azure/app-service/environment/intro I have set up an App in but I am struggling to either publish from my machine (I've added the URLs to my HOSTS file and I can see it in a browser) and cant see a clear way to publish it from Azure Dev Ops (my preferred option).
I'd be happy to be pointed to TFM but everything I find is out of date / not near the options I can see in Dev Ios or Visual Studio (2019 / 2019 Preview).
EDIT: Also note this is a multi project solution (various console apps, an API and a website it is the API / Website I want to publish)
EDIT 2: So "its always DNS" it was a DNS issue in trying to publish from Visual Studio
You can check these two links:
https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019
https://learn.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment?tabs=github
If you use Visual Studio, see: Deploy an ASP.NET Web App in Azure App Service.
If you use Azure pipeline, this doc: Deploy an Azure Web App provides a tutorial to build web app and then deploy to an Azure Web App. Also see this video for detailed guidance: Build and deploy to an Azure Web App using VSTS (Quick Starts).
BTW, there are a few useful tools: Azure DevOps Labs, Azure DevOps Services Demo Generator, and DevOps Starter which will help you to get started with Azure DevOps services to automate software delivery and meet business needs.
I am trying to deploy 4 or more webjobs and a webapi to a single app service on Azure, using Azure Devops.
I have read previously that to deploy a webjobs i needed to prp my artefact with the following tree organisation : webjobs/app_data/jobs/continuous ou webjobs/app_data/jobs/triggered
So i made it so that my build prepared the artefacts organised like this :
artefact
/WebApi
/...dlls and stuff
/webjob
/app_data
/jobs
/continuous
/webjob1
/...
/webjob2
/...
/triggered
/webjob3
/...
/Webjob4
/...
When i deploy webjobs, using the task Azure App Service Deploy, and pointing the folder webjob, i can see my webjobs being deployed all well.
But when i try to deploy the webApi as well, it doesn't work.
I first tried to deploy webjobs and webapi in two separated task (still using Azure App Service Deploy ) but one was overwritting the others.
I then tried using one task Azure App Service Deploy, by providing the top folder containing WebApi and webjob, but this doesn't seem to work.
I suppose there is a simple thing to do here, but i don't seem to be able to work it out ...
Is there any people who have managed to do this ?
Check this case: How do you deploy an Azure WebJob and App to the same App Service via VSTS?
You need to associate webjobs with web app, by right clicking your Web App project in Visual Studio and select Add > Existing Project as Azure WebJob and follow the wizard.
The webjobS are included in the web app package, then you just need to deploy web app to azure app service.
It will generate webjob’s package too during publishing (that why there are two zip files), but you just need to specify web app package in Azure App Service deploy task. (Check Publish using Web Deploy option). Make sure the "Exclude files from the App_data folder" is unchecked:
I currently have a .net and an angular app, both deployed to azure via appveyor. Now I want to add a node.js app, also in a github repo, also to be deployed via appveyor and into azure.
However I have no idea where to start.
What kind of azure app should I create? Just the standard web app service?
How do I deploy this to azure via appveyor?
What kind of azure app should I create? Just the standard web app
service?
At first, I could share Azure App Service plan and when we selected one of them with you. Please refer to this document(https://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/ ). Then, for selecting which one service plan, it depended on the site load and requirements. It is not relation to deployment channel.
How do I deploy this to azure via appveyor?
You can try to follow this guide Deploying using Web Deploy, mark Package Web Applications for Web Deploy check box in the settings=>build tab of your project in appveyor.
Then login Azure Management Portal and download publish profile.Specify the following deployment settings in AppVeyor:
Server: https://<publishUrl>/msdeploy.axd?site=<msdeploySite>
Website name: <msdeploySite>
Username: <userName>
Password: <userPWD>
NTLM: disabled
Replace <publishUrl>, <msdeploySite>, <userName> and <userPWD> with values from downloaded publishing profile XML file, in the deployment tab.
With the new Azure Mobile App Services in Azure the mobile services apparently gains the same WebJob support as Websites have had for a while.
Following the article Deploy WebJobs using Visual Studio according to the section 'Enable automatic WebJobs deployment with a web project' we should be able to add a web job from a right click on the project. None of these options show up for my mobile service project in VS.
I can add a WebJob project to the solution manually, but this does not add the webjobs-list.json file to my mobile service project as the article suggests.
Does anyone know why the add web job context menu doesn't show when right-clicking on the mobile service project? Or the manual steps required to configure the project and appropriate webjobs-list.json file?
Update:
I have manually added the webjobs-list.json file to the main project by copying the format from another initial template project and adjusted the web job project path in it. Even deploying the mobile service to an azure web app doesn't pick up the web job.
It should work. I just created a new Mobile App, downloaded the quickstart, right-clicked the web project (appname-code), and was able to associate a webjob to the web project. Deployment worked as planned. Did you try that workflow? Did you try adding the webjob through the portal?
My goal is to be able to deploy a package of ASP.NET website stored in Azure Storage as Azure Web Site programmatically (using C# ASP.NET) with just a click of a button. I know this can be done if I will deploy it as Azure Cloud Service by using Service Management API or azure powershell.
I dig into the source code of azure powershell and I see that it can only deploy from local Git and GitHub repo. Does anyone have any idea of how to do it from Azure Storage?
Note: I want to be able to manage all the Web Deploy Packages (stored in Azure Storage) online. I have an ASP.NET MVC website deployed as Azure web site and I will be using this one to automate deployments.
How are you packaging your site in blog storage? One way to publish to Windows Azure Web Sites is to use web deploy. You could package your site as a web deploy package as part of your build, and then use msdeploy.exe to push your bits to the site:
http://technet.microsoft.com/en-us/library/dd569106(v=ws.10).aspx
This would be no different from using web deploy to publish to an IIS Server.
It looks like someone else has used this approach with success:
http://robdmoore.id.au/blog/2013/06/01/windows-azure-web-sites-programmatic-web-deploy/
Hope this helps!
You could totally do this using the Windows Azure Management Libraries and the Storage SDK together. If I'm right in reading this, do you want a Web Site that you use to spin up new Cloud Services, and you want to deploy those services from the server side of your web site. If that's the case, you could do that using the Compute Management Client NuGet.