Azure Web App. SFTP Doesn't Display Files - azure

We published our application to Azure Web App via Azure Dev Ops. When we SFTP into the Web App we can only see hostingstart.html, yet side loads and we can see proper files in Kuded and App Service Editor. There is only 1 deployment slot in our Azure Web App. How is that possible

Check if WEBSITE_RUN_FROM_PACKAGE is set to "1" in application settings. This setting doesn't extract the package content to the D:\home\site\wwwroot directory of your app. Instead, it uploads the ZIP file as-is to D:\home\data\SitePackages, and creates a packagename.txt in the same directory, that contains the name of the ZIP package to load at runtime.
See: learn.microsoft.com/en-us/azure/app-service/deploy-run-package

Related

How can I manually copy a deployment build of ASP.NET Core application to Azure web application (App Service)

I have an ASP.NET Core (5) application which is a Webapi application which also hosts React static files.
I have built the application and I can start it on my machine and it works fine with Kestrel.
I have created an appropriate web application (Azure App Service) on Azure and configured it to use .NET 5 on Linux.
How can I manually copy the files (executable, runtime and React static files) to my App Service?
If this is not possible then is there an alternative Azure service that I could use (besides having a virtual machine)?
Just zip the content and visit https://<app_name>.scm.azurewebsites.net/ZipDeployUI where <app_name> is the name of your web app and upload the file inside wwwroot folder (drag and drop the zip file).
As another option, try access Kudu portal using Azure Portal:
I do not know what is the problem. All *.scm.* urls for my application return 'Service unavailable' in the browser (just this single pair of words in white color on gray background).
I've finally delete the application and I will create it again.

IIS Web App Deploy - Azure DevOps Release task deploying all the files present in wwwroot

I am trying out a release via Azure DevOps. Below is how my screenshot of IIS WebApp Manage task.
Below is my IIS Web App Deploy task:
My artifacts, i.e., the zip file contains only the folder named package.
But, still, everything present under wwwroot folder gets deployed to the new web app.
Below is the screenshot of my wwwroot directory:
and thus below are the contents shown under IIS for my newly created website:
I don't expect Verify2WebServiceSSL to be present here as it is not part of the .zip artifacts.
This is setting the root of the website to .\wwwroot, so all other files in .\wwwroot are showing in IIS as part of the website.
Try Updating the following to give your VerifyAPI its own folder and clean it during a deployment.
IIS Web App Manage:
IISWebsite
Physical path: %SystemDrive%\inetpub\wwwroot\VerifyAPI
IIS Web App Deploy
Advance Deployment Options
Check 'Remove Addition Files at Destination'

Adding additional files to VSTS Release to azure web app

I have a release in VSTS to deploy my webapp to the azure app service. For this I use a Azure App Service deploy step. After the normal deploy of the webapp I want to add an additional zip artifact from another build result. I want to copy only those file to a specific path of the web application on azure. How can I do that?
If the zip file is the web deploy package, you can refer to Joy’s answer. (Need to check Application option)
Otherwise, the simple way is using Kudu REST API (remain folder structure), steps:
Uncheck Publish using Web Deploy option of Azure App Service Deploy task
(Optional) Add Unzip task to extract zip files to a folder in artifact folder (the folder that you want in app service, e.g. D:/1/a/mylib)
Specify folder (parent folder of step 2 to remain folder structure) or package (zip) in Package or folder input box
You could use Virtual applications and directories to do it.You could check my steps.
Go to azure portal -> APPLICATION -> APPLICATION SETTINGS->Virtual applications and directories
set virtual directory with virtual path : /YourApplication to site\YourApplicationorsite\wwwroot\YourApplication
Go to VSTS-> the release option-> the Deploy Azure App Service task
set virtual application to /myApplication
Hope it can help you.
If using Azure DevOps for your CI then an alternative solution is to zip your file(s) including directory structure from the web root and add them into DevOps as a 'secure file' (find this under library/secure files once you've configured an Azure KeyVault).
Then add a pipeline task to download the secure file (use "Download secure file" task) to your build server. Make sure you add a "Reference name" to this task so you can reference the downloaded file path in a later step.
Then add a stand-alone "Azure App Service Deploy" step to deploy just this zip file. Select deployment method of "Zip deploy" and reference your downloaded secure file in the "Package or folder" section, like $(secureFileReferenceName.secureFilePath).
This effectively downloads the zip file from secure storage to the build agent and unzips it to wwwroot in the App Service.

VSTS deployment not working properly

I've got .Net solution Built in VSTS. My Release also succeeded but I'm not able to see my WebApplication running. Find the screenshot attached
Please find my Deploy azure app service task screenshot attached .
Please suggest if i miss any configuration.
I see your package or folder to deploy in Deploy Azure App Service task is pointed to drop folder. Instead it should be pointed to zip file inside the drop folder.
Eg: $(System.DefaultWorkingDirectory)/TestApp/drop/TestApp.zip
Try this and update if any other issue.
It is the content of hostingstart.html, which is in the wwwroot folder of app service, you can check the files by accessing https://[web app name].scm.azurewebsites.net/DebugConsole and go to site\wwwroot folder.
If the app service can’t recognize the web project (e.g. Global.asax) and there aren’t the default page files (Web service Application settings.), it will display hosttingstart.html page)
So, you need to check the files in release artifact.
If it is the web deploy package (zip file), you need to publish it through Web Deploy. (Check Publish using Web Deploy option and specify package path in Package or folder box (e.g. $(System.DefaultWorkingDirectory)/**/*.zip), you can clear additional files by checking Remove additional files at destination option)

Accessing Web App Files by Cloud Service

I have deployed my web app and the cloud service on windows azure. Web app saved some of the image files on its own directory lets say on root of the website there is folder name "Content" and web app save the image files on this folder. is there a way a cloud service can access files inside that folder? cloud service is separate project and hence has its own url and hosted on windows azure portal.
AFAIK, it is not possible to share files stored in a web app with a cloud service. What you should do instead is save the files in Blob Storage. That way both Web App and Cloud service can have access to the files.
Another option you have is Azure File Services, you will have the chance to used as a network shared location.
take a look at this here:
https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files/

Resources