Azure App Service not reflecting file changes from ftp - azure-web-app-service

I am new to Azure and I have created a very simple App Service in Azure with everything default. Changed the App Service Plan to B1. I can browse the app service home page and see the default page. I then connect using FTP and try to change the default page, but it did not reflect changes.
I even downloaded publish profile and published a .net core 3.1 web api with defaults, I can see the files are deployed using FTP but the api is not present. I even deleted the default page but the home page still appears. It seems the ftp is not pointing to default location where files are being picked up by asp.net core.

You can refer my answer in this post. Then use kudu to check whether the time of the last update file via FTP is consistent with the release time. If the file is not updated, of course this update has no effect. Then we can check the FTP connection str.
But first, I suggest you to modify index.html or default interface function and update by kudu. Then check if the update file is effective. If success, I can sure you code is ok.
Second, check your FTP Connection str.
Step 1. Find Deployment Center->FTP, click FTP then you can see Dashboard, into Dashboard find FTPS Endpoint,Username and Password.
Step 2. Use FileZilla, connect it. You can see files in it.
Then you can try again. Under normal circumstances, there is no problem to update via FTP.If the problem is still not resolved, I suggest that you can deploy to local IIS for debugging.

I was facing same problem like, publish contain not displaying when visit website. then i change following settings and it worked.

I had the same issue updating files in FTP and the dlls weren't being updated as they were being used by the site. I had to stop the App Service first and then update the files. The changes then reflected when restarting it.

Related

The Publish URL https://waws-prod-am2-xxx.publish.azurewebsites.windows.net/ is unreachable

I created a function app on Azure Portal with below configuration.
And I created a simple HTTP trigger Function App on VS 2019 version of 16.7.6. The function is working successfuly on local machine. When I want to publish it to Azure, it returns below error;
Publish has encountered an error. The Publish URL
https://waws-prod-am2-xxx.publish.azurewebsites.windows.net/ is
unreachable. The application may be stopped, restarting or
unavailable. Try again once the publish target is available.
The publishing summary is;
When I check the publish profile on VS (.pubxml file), I see the line
<PublishUrl>https://waws-prod-am2-311.publish.azurewebsites.windows.net/</PublishUrl>
But it should be
<PublishUrl>http://myfuncappdss.scm.azurewebsites.net</PublishUrl>
I change it manually and there is any other error that is not detected
Publish has encountered an error. Publish has encountered an error. We
were unable to determine the cause of the error.
It hasn't published for 2 days. Before, I published successfully. I search it on google but I couldn't find any clue.
Btw, I can reach the FTP file of the function successfully. And the function running successfully on https://myfuncappdss.azurewebsites.net/ site.
I tried it with az command also but it wasn't work, too. All my teammates can't publish also. So, the problem is not just about my computer.
Why is the PublishUrl set with wrong URL?
When I check the publish profile in Visual Studio (.pubxml file), I see the line:
<PublishUrl>https://waws-prod-am2-311.publish.azurewebsites.windows.net/</PublishUrl>
But it should be
<PublishUrl>https://myfuncappdss.scm.azurewebsites.net</PublishUrl>
I changed it manually and then it started working fine.
Step 1: Do the above URL changes and save the .pubxml file
Step 2: Close Visual Studio.
Step 3: Open your project in Visual Studio.
Step 4: Now publish, it should work as expected…
Here we have successfully deployed the Function App.
Update:
Thanks for Aybuke's aharing, this is the reason of the problem:
The problem base is about function publish profile. When I follow the steps, (Go to Azure Portal-->Go to function app-->Overview menu-->Get Publish Profile) I can download the publish profile of function. So, I can see the publish settings of function. "publishUrl="https://waws-prod-am2-xxx.publish.azurewebsites.windows.net:443"" This line is in the publish profile file that I downloaded. But it should be "publishUrl="https://myfuncappdss.scm.azurewebsites.net"". That is why the published zip file is sent to wrong url. So, there are some problems while creating function on Azure Portal.
Original Answer:
Did you encounter this error?
I notice you change publish url to http://myfuncappdss.scm.azurewebsites.net, please change it to https://myfuncappdss.scm.azurewebsites.net and try again.
If I use http, I also can not publish my function app. I don't know why the publish url is not what you want, but the az command should work. Any details when you use az command?
Change http to https, it should work.
I had this issue and the problem was on the App Function Settings.
In Networking, Inbound Traffic had Access Restrictions ON.
I had to add my public IP Address and then I was able to publish.

I have copied files via FileZilla to Azure but the index page doesn't show

I shall try not to be subjective so as not be closed.
This is my first foray into Azure and it really is NOT like my dedicated server on another hosting company. Suffice it to say, what takes me minutes to deploy a site via FTP, then to IIS to set it up, has taken me WEEKS!
I don't want to set up any of the "pre-packaged" Quickstart solutions. I simply want my INDEX.HTML file to DISPLAY.
I copied all the files via Filezilla to Azure, quite easily, but yet, when I go to the URL, I keep getting:
Your App Service app has been created
Go to your app's Quick Start guide in the Azure portal to get started or read our deployment documentation.
Everything is set up on Azure perfectly.
Here's what it looks like under the appSettings Tab:
**Virtual applications and directories**
/ site\wwwroot Application …
/wwwroot site\wwwroot\mynewsite Application …
The directory, site\wwwroot\mynewsite has an index.html but it will not display when I type in the URL.
I already built the site and the company I'm working for wants it on AZURE.
A dedicated server takes under 15 min. This has taken weeks.
UPDATE:
Thiago, thank you... so here's the file structure below...
Reveals EXACTLY what my directory looks like. Under /thingblugrow is where "the fake name" mynewsite exists. I thought it'd be easier to just show you what I really have.
So, /thingblugrow has an index.html file....
If your want to visit http://yoursitename.azurewebsites.net/mynewsite/index.html,
The appsetting we need config it as following in your case:
Virtual applications and directories
/ site\wwwroot Application …
/mynewsite site\wwwroot\thingblugrow Application …
You also can refer to another SO Thread to get more info about creating Virtual applications and directories
You're adding an extra level, so in your case you'll be able to see the index through:
http://yoursitename.azurewebsites.net/mynewsite/index.html
Just move all the content from "mynewsite" folder to the parent directory (wwwroot).

You do not have permission to view this directory or page Azure Dropbox

I am trying to deploy azure web app. Below is the link.
denemezk.azurewebsites.net
When I first create the page it works, it gives a default page that says you should deploy now.
But when I try to deploy something -anything- via Dropbox, it says "You do not have permission to view this directory or page" and even if i delete everything this never changes. It does not return to the default page, it still gives the same error message on the title. I can no longer use that page. How can I fix this?
Thank you,
I am editting this post because I dig a little deeper and find out that when I deploy things, I am deleting the hostingstart.html file.
What could I be doing wrong? and,
How can I fix it?
You have to actually go to the Azure Deployment Options and click Sync, this will pull the changes from the DropBox folder in to your wwwroot folder.
The fist thing you should do is actually go and check the folders if your war got unpacked inside the webapps folder. for that if your web url is "denemezk.azurewebsites.net" then try to open denemezk.scm.azurewebsites.net. This should redirect you to KUDU interface where you can see few tabs. From those tabs select Debug Console and then select CMD from the drop down. This should give you a folder structure.Now Go to site->wwwroot->webapps . There check if your war got unpacked.
If not then try restarting the web app and see id this does the trick.
If while creating your app service plan you have selected the Standard pricing tier, change it to premium.
Last but not the list you can enable logging for you app. Then go to Monitoring-> Diagnostics logs . Turn those setting on. Then select Log streaming(Just below Diagnostics logs).
Hope this help.

How to take web app offline while publishing?

Very often, when I hit Publish in VS13, I get the site to compile but when uploading I get the error saying that a file is busy.
Updating file (MyAzureSite\PrecompiledApp.config).
C:...\v12.0\Web\Microsoft.Web.Publishing.targets(4255,5):
Error ERROR_FILE_IN_USE: Web deployment task failed.
(The file 'PrecompiledApp.config' is in use.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)
When I follow the link provided, it's suggested that I should go for enabling the appOffline rule. "Sure!", I think to myself. But how?! I've googled it, only to get a bunch of hits on the file that's supposed to replace the site while publishing. However, I get no info on how to get rid of my little problem.
I went the easy way and downloaded a publishing profile from my Azure web site and now I'm using it (you know, ALT+B+H).
Right now I resolve the problem by going to the portal for Azure and manually take the site off-line. Then I can publish and after that I take the site on-line. Highly impractical and painfully tedious.
What is causing this and how do I kill it?
You actually configure it in the publishing profile (.pubxml). Just add the element to the PropertyGroup like this:
<PropertyGroup>
<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
...
</PropertyGroup>
More in this MSDN document
The Azure App Service Deployment Task has a checkbox for this (from version 2.0 onwards), under Additional Deployment Options: Take App Offline. Check that and you should be good to go.
Take Application Offline: Select the option to take the AzureRM Web App offline by placing an app_offline.htm file in the root directory of the Web App before the sync operation begins. The file will be removed after the sync operation completes successfully.
Screenshot:

Getting CC-Tray to work

I am trying to get cc-tray to work instead of using the web dashboard. I'm not sure how I can get the correct url for the server that my cruisecontrol is running on and I can't find any useful documentations online. Can anyone help?
Thanks
I had the same trouble and was resolved setting this Url in the Add Server (http): http://yourserver/ccnet/server/local/ViewServerReport.aspx. It works fine with this.
It depends a bit on the version you use. It is always a good idea to use the version of CCTray that you download from your running instance of the CCNet dashboard (on the dashboard, in the left column, you'll find a link 'Download CCTray').
Then it is mostly a matter of "Add Server". Older versions required a Remoting connection that requires some ports open in your connection to CCNet. Nowadays, you can connect over HTTP.
If you are using a version after 1.1 then you will want to point your CC tray client to the web dashboard site.
You should make sure you have the CCNET dashboard setup of a web server then you can do the following.
File > Settings > Build Projects (click add)
Add Server (click)
Choose Via the CruiseControl dashboard
Enter the address of your web dashboard site. Perhaps something like "yourserver.com/ccnet". You can find this via browsing to the web dashboard then copying the URL upto the folder level.
Click OK, choose the projects to watch
Profit!

Resources