Failed to publish virtual application to Azure - azure

I have two asp.net core 2.0 projects in the same solution, that I would like to be deployed on the same Azure Application service.
Following this tutorial, I can successfully deploy the first project and add the virtual application path to the second as can be seen:
The problem is that when I try to deploy the second project I get the following error :
(9/6/2017 10:25:35 AM) An error occurred when the request was processed on the remote computer.
Could not find a part of the path 'D:\home\site\api\App_Offline.htm'.
It looks like it's not creating the virtual application and directory. Any ideias? I've already seen that the directory must match your project name (tried with that and also failed), that it should be site\wwwroot\projectName. What am I missing?

I can reproduce the issue on my side when I deploy my web application to virtual application.
If I manually create physical path for virtual application before deployment, I can deploy the app without this issue, you can try it.
Create Api folder
Publish result

Related

having trouble deploying backend to azure

So I have a web app that has an Angular frontend and a Node.js backend. I'm trying to deploy to Azure using the Azure App Extension in Visual Studio Code. However, this is my first time using Azure so I don't really know what I should do. Right now I have two web apps, one for the frontend and one for the backend, and they are using the same App Service Plan and Resource Group.
When I try deploying the backend, it won't even deploy it. I've tried changing the folder its being deployed from, using the KUDU console to zip deploy, but nothing works.
I tried a tutorial to make a test project and upload that to Azure (as shown here https://learn.microsoft.com/en-us/azure/javascript/tutorial-vscode-azure-app-service-node-01?tabs=bash). That test project deployed perfectly fine to Azure, however, when I went back to try my source code, the folders wouldn't deploy. How do i fix this problem?
Edit: After doing some troubleshooting, I'm getting these error messages:
Cleaning up temp folders from previous zip deployments and extracting pushed zip file D:\local\Temp\zipdeploy\oplaw3rp.zip (178.92 MB) to D:\local\Temp\zipdeploy\extracted
There is not enough space on the disk.\r\n
Looks like you're running out of disk space before the zip fully extracts. Upgrade to Basic or Standard SKU (10 GB of storage) see if that fixes it.
App Service Plans compared -
https://azure.microsoft.com/en-us/pricing/details/app-service/plans/

How FTP deploy .NET Core WebApp to Azure Linux App Service plan

I want do deploy code to Linux App service plan over FTP but I fail because I am missing a step how to "say to app service to use app DLL instead of default one".
Code is copied, I even uploaded test zip file and I can't download it, getting error 404 so how did Microsoft imagine to deploy code over FTP? I couldn't find any info in their documentation regarding this exact case.
I want to avoid using docker file, If this can't be done I'll simply switch to using Windows based App service plan.
In application setting screen of your WebApp mention the startup file name
dotnet

Azure Continuous Delivery - How to deploy a folder to an App Service?

I'm pretty sure i am doing something wrong.
But let me attempt to explain my situation...
I created an Azure App Service with Continuous Delivery configured. So far i see that all my deployments are successful. When i go to my app service URL i see Service Unavailable.
Now i suspect my problem could be related to what is being deployed.
Note that I am using Visual Studio Online for my source control and build system.
The source/repo only has 3 folders:
- A folder called .vscode
- A folder called Tools (a bunch of .net console apps)
- A folder called Service (my node.js based service)
Now, the source builds successfully.
And the continuous deployment, triggered after a queued build, completes successfully.
But when i go to the service url i see the dreaded message "Service Unavailable".
I suspect the problem is related to this:
Basically im not sure what is being deployed here.
What i want to deploy is just the Service folder (my node.js app).
I suspect somehow that the entire source tree is being deployed.
Some additional details:
Http Protocol: HTTPS
Error: 503 - Service Temporarily Unavailable
Any help/insights are much appreciated!
Updates
I am confused if the Continuous Delivery option can deploy the node.js app. I did come across this article which shows how to deploy node.js app via "Push to Azure from Git".
Updates 2
I'm not entirely sure right now because i havent tried this out. But the answer to this question seems to hold the key (it seems like it is exactly what im looking for).
Updated 3
I was able actually get the node.js app to start. The issue was that the .js file is two folders deep (in the Service folder). I updated the "Startup command" setting under the "Deploy Azure App Service" (under Continuous Delivery build definition). Now i can see (from the Kudu Docker logs) that it is running.
The problem im having now is that the node.js app can't seem to conenct to the Azure SQL database (this works when i run locally).

FTP'ing a Suave app to Azure

Having never used Azure before I'm attempting to deploy a simple F# Suave app to Azure using FTP. Ultimately I want to deploy via github but I initially thought FTP'ing it would be the easy first step. According to https://suave.io/azure-app-service.html it should be straight forward.
These are the steps I followed
Created a new web app in Azure including a resource group
and app service plan. All on the Free Tier.
Downloaded the publishsettings XML file that Azure created.
Cloned this repo: https://github.com/isaacabraham/fsharp-demonstrator
Used FileZilla to connect via FTP using the creds
from step 2.
Uploaded the files (via FTP) from
fsharp-demonstrator/src/SuaveHost (which includes the necessary web.config file) from the repo cloned at step 3 to
the site\wwwroot on Azure.
Navigated to Azure site url.
Then I receive the error:
The specified CGI application encountered an error and the server terminated the process.
(When I look at the folders on Azure under site\wwwroot I don't see any obj or bin folders. I don't think any msbuild process occurred. That doesn't seem right.)
Anybody got any idea what the problem is?
I suspect the issue is that when you deploy via FTP, then Azure does not automatically run the deploy script specified in the .deployment file.
The build.fsx script uses Kudu service to deploy the built files, so it might be easier to just use Github deployment rather than FTP - this way, Azure will do the deployment for you.
If you want to deploy via FTP, you'll need to build the project locally and upload the output. I'm not sure how to best do this with Isaac's Kudu-based demo though (ultimately, you need web.config that points to your built executable like this)

Deploy to Azure Web App Virtual Application with Visual Studio Online Source Control Integration

We have an Azure Web App that we have Source Control integration setup with Visual Studio Online via the built in Azure functionality. This, of course, creates a build definition in our Visual Studio Online account. We have had this configured and it has worked just fine for deploying our website by queuing a build.
Our ultimate configuration is to actually create a Virtual Application and use the build to deploy to the Virtual Application instead of the web app site root.
So, we created the Virtual Application in the portal. See screenshot:
Our trouble comes in that we can't get the build definition to actually deploy to this virtual application. The build either fails or the files still end up in the site\wwwroot folder.
Our azure web app name is: inyoforum(staging)
We've tried numerous variations of the following MSBuild arguments:
/p:DeployIisAppPath="inyoforum__Staging/Forum"
/p:DeployIisAppPath="inyoforum__Staging\Forum"
/p:DeployIisAppPath="inyoforum(staging)/Forum"
/p:DeployIisAppPath="inyoforum(staging)\Forum"
We even tried other variations. We tried using a publish profile instead. We can get a publish from our local Visual Studio application to the virtual application, but we've been unable to do it from the build definition.
Any suggestions on other things to try?
You can create a publish profile to publish the website to virtual app and specify the profile in MSBuild Arguments. Steps like following:
Create a publish profile according to the instruction here: Deploying multiple virtual directories to a single Azure Website.
Check in the publish profile.
Create a new build definition and enter following strings in MSBuild arguments:
/p:DeployOnBuild=true /p:PublishProfile=xxxx.pubxml
Queue a new build with the definition, the web app will be deployed to virtual app.
You can also install MSDeploy Package Sync task and use it to deploy to virtual app. Please refer to this article for details: CUSTOM DEPLOY TASK TO DEPLOY VIRTUAL APPLICATIONS TO AZURE
I had this same problem and found virtual directories are not supported by MSDeploy PowerShell scripts. So I created a custom deployment task to support this use case. Give it try -
https://dotnetcatch.com/2016/03/22/vsts-release-custom-deploy-task-to-deploy-virtual-applications-to-azure/

Resources