Large number of files missing in fileManager of a website deployed on Azure App Service - azure

I am unsure if this is happening by design, or it's supposed to work this way. Through Visual studio Publish option, I published my ASP.NET Core website on Azure App Service. Now, when I access the fileManager on https://mywebsite.scm.azurewebsites.net/fileManager, I am missing majority of the files. I can only browse some log files, several zipped packages.
The website itself works fine when I am trying to access it on the link, however I am unable to browse all the files for it. I was wondering if this is an intended design, or I have done something wrong.
Kind Regards.

HTML5 component, that allows web pages to store named key value pairs locally. It just setting to store our web app.
To solve the files not able to view via kudu
Open Browser -> go to Developer tools or hit F12 -> In the console run the following cmd
window.localStorage['maxViewItems'] = 1000
Still you are facing issue please check and compare with Azure App Service Editor and Kudu files. I had checked both Kudu and App Service Editor shows the same files which contain the web app.
Refer Kudu error with maxViewItems in localstorage

Related

Azure App Service on Linux - Static File Content not updated

I have created an App Service (inside Linux based App Service Plan). I have connected to wwwroot folder using FTP Client
In the hostingstaart.html, I made a simple text change.
I couldn't see the change getting reflected when I navigate to https://.azurewebsites.net/
However, when I navigate to Kudu and access the same page, I can see the change.
Below is the screenshot.
In the left hand side (kudu website), I can see the change that I have made (DevOps Engineers). However, In this right hand side, the changes is not shown.
In order to troubleshoot, I have added another file as well which is visible in Kudu. But, I'm not able to access the same.
This is not at all an issue in Windows Based App Service Plan. This is an issue only with Linux based app.
Is there any docker container internally where it reads the files from? if yes, how do change those files?
Appreciate any help here .
Thanks,
Praveen
Yes, Azure App Service on Linux run in containers and depending on the platform, different webservers and locations are used which can get confusing.
For SSH access into the container go to https://<yourappname>.scm.azurewebsites.net/webssh/host - in .NET projects on Linux the default page you'll see on a new app service is stored at /defaulthome/hostingstart/wwwroot/hostingstart.html while files you upload via FTP will go to /home/site/wwwroot.
That being said, I'd recommend to use the documented ways to publish content based on the platform you want to use. For .NET, you can find the docs here.

.NET5 Blazor Server app in Azure App Services returns "You do not have permission to view this directory or page"

I am trying to deploy a Blazor Server app using .NET5 to an Azure App Service via Azure DevOps.
The Blazor app runs and works correctly locally. The Azure DevOps pipeline appears to also be building and deploying correctly. If I use the console in the Azure portal I can see that the files I would expect are in the wwwroot folder (which I guess is correct?). In Configuration > General Settings I can see that the App Service is correctly configured for .NET 5. On the network side there are currently no access restrictions. I've also turned off all auth in the app for now just to make sure that wasn't having an impact.
When I try to access the site at https://my-app.azurewebsites.net (not the real url, just an example in case it's relevant) I get a white page with the following text: "You do not have permission to view this directory or page.". When I look in the Diagnostics dump from the Kudu page I can see more detail error pages which say 403.14 - Forbidden and the message "The Web server is configured to not list the contents of this directory.". If I look in App Insights for the times when I try to access it I can see requests with 403 response too (for some reason with url: http://localhost/). Unfortunately this error seems to cover a multitude of errors and so while I've found various sources with similar problems, none of the solutions I've found so far have had any positive impact.
EDIT: So I did some more digging and I think some files might be missing. I tried creating a new Blazor Server app and publishing it manually via Visual Studio. This worked and the only difference I've found from my app is that I have no web.config, hostingstart.html, or static css/js etc (from wwwroot). None of these files are in the output directory when I build for either my app or the test app I created so it looks like they must be getting added separately by something in the VS manual publish process and Azure DevOps publish step isn't doing it. Still not sure what the correct way to fix this is (or even entirely sure if any or all of this stuff is relevant).
Has anyone out there got any idea what I might be missing?
So after working out what was going on here I was going to delete this but I figured possibly someone else will make the same mistake I did and this might help. Basically I'd copied another deployment pipeline for an Azure function app as the basis for the deployment pipeline for this and in that I just did a dotnet build and that's enough. However it seems for this kind of app to get wholesome output you need to run dotnet publish.

Azure, App service, the site show the message "This web app has been successfully created" after deployment although localy the site appears

I'm using VS 2013 and SDK 2.2 to deploy to App Services, the site opens in it's address and show the message "This web app has been successfully created".
Like when there is no code in the cloud app. although I can enter the App Service Editor, and see the code is there.
Localy I run the site and it show the Home/index page, but not in the cloud.
It was fine before, until I remove the web project and created another one with the same name instead.
Hope all this clause help to solve..
Since I try to redeploy, the SDK assumed some files are already exists and did not reload them.
They were probably corrupted.
The solution was to delete the complete deplyment, the wwroot directory and redeploy.

Azure: Is there a way to view deployed files in Azure?

Is there a file "view" available in Azure?
When I log in to Azure to look at a website I've deployed there is no obvious see exactly what files Azure is hosting.
I can see there's the Visual Studio Online option which allows you to live edit your server code but that is more than I need. I just want to be able to check that certain files are deployed and others are not.
If you're just trying to look around, and see the various directories and files in your deployment, you can enter the site's "Kudu" dashboard, using the url format http://<yoursitename>.scm.azurewebsites.net
This will give you a web-based dashboard, including a debug console (web-based) where you can explore your various directories (and the directories will show up visually as well).
More info can be found in this post from the Azure Websites team.
In Visual Studio, in the window "Server Explorer" you click and connect on "Azure".
=> App Service
=> Your site name
=> Files
Here you see all your files and you can edit them directly in Visual Studio.
##### UPDATE 19/08/2019 #####
For some time now, it hasn't worked anymore.... :(
Here is another way to do it: By FTP !
From the Azure portal, in the "App Service" section of your website, go to "Deployment Center" > FTP > Dashboard
There is the FTPS Endpoint => ftp://.....ftp.azurewebsites.windows.net/site/wwwroot
And username, password information.
Install FileZilla Client! (https://filezilla-project.org/)
Enter Host with "FTPS Endpoint" the "username" and "password" and then login quickly!
You can use App Service Editor (previously known as Visual Studio Online). It can be found under your webapp -> Development Tools section in the Azure Portal.
I know this is old, but I just found it, and got some useful tips from it. If you are using an App Service, there is now a browser option to do this as well:
https://YourAppService.scm.azurewebsites.net/dev/wwwroot/
You can get there from the Azure portal, then go to your App service, then scroll down to Development Tools, and click on "App Service Editor".
In VS2017/2019, there's Cloud Explorer to view files in Azure, but each time open folder to view files will invoke connection to cloud, so you have to wait, that's a bit slow.
To open Cloud Explore, Right click on project > Publish > Manage in Cloud Explore, or Top Menu > View > Cloud Explorer.
Yes, you have many options to see that
By clicking Console option (run "dir" command, will list down all files)
By hitting App Service Editor(Preview) option,
Adding to the accepted answer,
you can open an ssh session by going to http://<yoursitename>.scm.azurewebsites.net/webssh/host.
For a long time, I've looked for a linux-style terminal to view my deployed files and environment variables. With this you can view the files, check and set environment variables, make db migrations directly, and a lot more. Hope this is useful.
That could be relevant: AppService->Console
You can use Visual Studio Code and the Azure extension
Since you are using Azure Websites, Azure wants to "manage" it for you, and as a result, you cannot connect to the VM itself. If you were using a Cloud Service, you can obtain the RDP information from the Azure Console and just remote into the machine.
For your situation, you can use FTP as an option. Here is blog that describes one approach:
http://blogs.msdn.com/b/avkashchauhan/archive/2012/06/19/windows-azure-website-uploading-downloading-files-over-ftp-and-collecting-diagnostics-logs.aspx
Here is another option using WebMatrix:
http://www.microsoft.com/web/post/how-to-edit-a-site-hosted-on-windows-azure-with-webmatrix

How to get .publishsettings for Web Deployable Web Role?

I enabled the Web Deploy feature for my Web Role and deployed it.
But how can I get hold of the .publishsettings file so I can create a Publishing Profile for it?
This 2 year old article states that it should have been created automatically, but I haven't got that in my profile manager.
Any ideas?
If you are using Visual Studio 2012 or greater, the server explorer to the left will have several Azure items.
Specifically the Windows Azure Compute is what we are looking for, right click on that and say 'add deployment environment'. You will then be prompted with a dialog that allows you to sign in and download publish settings file:
You can get publishsettings file from the following link: https://windows.azure.com/download/publishprofile.aspx
Well, the problem was really behind the keyboard.
So the publishing profile is actually provisioned correctly and automatically to the Web project as the documentation states.
The problem and confusion was that I have a secondary web application in my Solution that I also publish to the same Web Role (referenced as an additional Site in the ServiceDefinition.csdef file).
That Web Project does not get the Publishing Profile, and when I try to create a profile manually, it doesn't work since that (secondary) IIs instance is not configured for Web Deployment.
Oh well, back to the tedious Cloud Service deployment it is...

Resources