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

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.

Related

Azure App Service not reflecting file changes from ftp

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.

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).

How to debug why azure web job does not start?

In Visual Studio, I am deploying a web site to Azure via the Publish menu option, and the project has an existing web job added to it (via the Add menu). It was added as a continuous job, and has the correct entries in the 'webjob-publish-settings.json' and 'webjobs-list.json' files.
When I publish the web site, the job is compiled and put into place in the 'jobs' folder and published with the web site. However, it is not started. No entry is added automatically to the WebJobs settings page in Azure, which remains empty. There are no errors in the output window.
The Azure webjobs documentation states that it will attempt to run a selection of files from within the webjob directory, and one of these is any file that ends with ".exe". The webjob project is a console project, and compiles into an exe which is published in the directory.
In the past, I have published this job by zipping the contents of the 'bin\Release' directory, and adding it manually.
How can I debug why it does not start when deployed automatically?
First thing you should do is look at exactly what got deployed, to make sure it looks like what you expect. To do this:
Go to Kudu Console
Go to D:\home\site\wwwroot\App_Data\jobs\continuous
You should see a folder named after your WebJob in there. Go in that folder
Check that it has all the right files
If it doesn't, then you likely have some kind of deployment issue, and it is not an issue with the WebJobs runtime.
I think when you published the Web site, it just copied over the Webjob files but Azure does not know that there's a Webjob that has been published. Could you please try publishing the WebJob separately by selecting "Publish as Webjob" option. If it has problems publishing that way then there's some problem in your Webjob, like app settings etc, and if it is successfully published then I guess you have to publish it separately every time or find a hack in Publish settings of the Website to publish both the projects.
Hope it helps. Thanks
I had a web job that was working fine, I stopped it, changed a value in the config file and started it again. It didn't start, no errors, no log issues, nothing at all.
How I fixed it? I clicked "Restart" button in the app service that contains all the web jobs.
Note: stop and start did not work, only "Restart" did the trick. It really makes no sense but that's what happened. I hope it helps others with the same issue.

Publish Multiple Projects to Different Locations on Azure Website

Feel free to recommend a better title or changes to my explanation below!
I am using Windows Azure Websites (for the first time) and have connected it to a solution in Visual Studio Online (also my first time). I was also able to connect to Visual Studio Online, create a project, throw up a master page and web form connected to a master page and my Azure website updated itself. Great!
My Issue
If I add another project to the solution it seems that this new project overwrites the files in the first one. I can't figure out how to set this up so:
Project 1 -> deploy to wwwroot (happens by default great!)
Project 2 -> deploy to wwwroot/sub/directory/ (doesn't seem to work)
Could somebody explain how to configure project 2 so that when the solution auto deploys to an Azure Website that it goes to a specific location?
Go to the Configure tab for the site in Azure portal.
Scroll all the way to the bottom then add a new application where ever you want like Project2 below.
Basically the 'Project2' part is the URL after the root '/' and the 'site\wwwroot\Project2' is where the actual folder should live under the site root
Download the publishing profile and import it in Visual Studio, then add the application name after your site name like below. Also remember to update the destination URL as well
hope that helps

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:

Resources