I deployed a newly created Asp.Net Core web application to an Azure app service using ftp, while enabling delete existing files, directly from VS 2019.
Now whenever I view the content of the wwroot folder using Winscp, the result is as expected and I see the latest output from my local build. But whenever I view the contents of the folder in Kudu, the list of files is outdated/reflects previous local builds outputs (screenshots below from winscp and from kudu in the browser).
What is going on here ?
This is also breaking my app, since my app's initialization code cannot read an xml file that I see in winscp, but is not visible when I navigate to the folder in kudu.
I already tried restarting the app service multiple times, to no avail.
What am I missing ??
wwroot contents from kudu
wwroot contents from winscp (files order alphabetically, the vue middleware should be displayed before web.config)
Related
I have some app services and I update the web sites content by uploading the data via FTPS.
Occasionally, after I upload new content, the sites don't display it at all or partially until the app service is restarted.
Is this normal behavior?
What can be done to avoid restarting or monitoring the site and automatically restarting the app service if the site does not appear properly after updating the content?
Thanks
Just to highlight, based on your application framework - Unlike Git-based deployments and Zip deployment, FTP deployment doesn't support build automation, such as: dependency restores (such as NuGet, NPM, PIP, and Composer automations), compilation of .NET binaries, generation of web.config (here is a Node.js example).
You may generate these necessary files manually on your local machine, and then deploy them together with your app.
Additionally, App Service deploys files to the wwwroot folder. It never directly restarts your app.
You may verify if the deployment files are in root folder. A deployment issue is an issue that causes the wrong set of files to get deployed to your site folder (typically d:\home\site\wwwroot). Deployment-vs-runtime-issues
I published my app Windows Application Packaging project as an app package.
The app installer and index.html are successfully published to the specified folder on my system. I can open the index.html and the app installer works.
If I upload the folder to my Azure App Service through FTP, the standard page doesn't get replaced by index.html.
I'm new to Azure and never worked with the Windows Application Packaging project before.
Thanks in advance.
If I upload the folder to my Azure App Service through FTP, the
standard page doesn't get replaced by index.html.
It worked for me when I tried to download and upload my index.html file to Azure using winscp client.
Created an Azure app service
Copy host name, user name and password of FTP(as shown in below image)
Install WinScp .
Enter credential that we copied earlier and login.
Delete the current html file from the www root.(as shown in below image)
Go to your local file location and drag and drop the index.html file which you want for your project.
Here are the screenshots for your reference:
Output of my designed index.html after replacing :
NOTE:
In same way we can use other client apps like
Filezilla as mentioned in the given document below.
Please refer the Microsoft Azure tutorial: How to upload a website to the cloud via FTP & this is for Deploy files to azure| MS DOC .
Using the Deployment Center link on the App Service page navigation in the azure portal, I was able to find my FTP credentials and easily log in with them. However, there are no files in the wwwroot folder except for hostingstart.html.
However, when I use the Azure Console, all my files appear in the wwwroot folder and the hostingstart.html file is not there.
I'm not sure if it's relevant but we do have continuous integration setup. I just want to be able to see those files and interact with them.
If I browse into the /LogFiles folder I can confirm that the FTP and Azure Command Line show the same files. So I know I am on the right server.
After much searching I learned what is going on. If you have the WEBSITE_RUN_FROM_PACKAGE setting enabled, your site is served out of a zip file.
The FTP server shows the real folder, whereas the kudu console maps that folder to the contents of the zip file.
This announcement explains it in a lot of detail.
Go to kudu and click "Current Docker logs (Download as zip)"
I have an application which is using internal file storage (folder) I can't include this folder in the project since the build is failing. I can deploy this build package which is a zip file using Azure Deploy task in the release pipeline but how can I copy that folder to the WebApp?
I don't have access to the FTP due to company policy
I can copy that folder to storage blob but then how can copy it to web app again?
Here's one way to do it.
In the Azure Portal, locate your Web App and click on the Advanced Tools menu. Click Go to launch the Kudu console. Select CMD from the Debug Console menu. You'll be presented with a graphical file explorer and a command line prompt. Simply drag and drop your local folder in the top portion.
You can use the Kudu REST API
PUT /api/zip/{path}/
Upload a zip file which gets expanded into the specified folder. Existing files are not deleted
unless they need to be overwritten by files in the zip. The path can be nested (e.g. folder1/folder2), and needs to exist.
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)