Permission issue while viewing app on azure - azure

I am running into this strange issue of not being able to view the web app once i try to browse it from azure. it gives me error by saying You do not have permission to view this directory or page. I don't know what going wrong. I simply created an app on azure and then using ftp client pushed a simple html page. When i try to browse it; it says you don't have permission although no login or permissions are set. This is a free trial subscription i wonder if this has to do something with it. I also tried to upload my node.js and angular web app but it gives the same issue. I even tried to change the port number to run the as in node we do. But now it doesn't even display a normal html page. I pasted it in WWW root folder using filezilla. Any idea how to go about it.

it gives me error by saying You do not have permission to view this directory or page
It seems that there is no default page match the default documents in the Azure WebApp setting. You could add the default page for your webapp in the Azure portal Appsetting. Or you could upload a index.html to the WebApp for test.

Related

.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 Web App FTP permission is denied and cannot upload files and cannot create folders

I'm managing small web app, deploying with (always) FTP. My teammate requested me to upload a folder including small teaser website. As usual routine, I opened the Azure Web App Deployment Center FTP dashboard and copied server address and credentials and pasted them into FileZilla(latest version). Login went well and I could see file list and folders. However, when I tried to upload files, remove existing files, all of the writing attempts failed with 550 Access is denied error. What could be the cause of this?
On the other hands, I could remove existing files on KUDU debug console.
I check the ftp link the deployment center provide, looks like the portal provides a read-only ftp link. So go to your web app, click Get publish profile, choose the publishUrl under tag profileName=<yourwebname-FTP>.

Azure Web Apps Deployment options Dropbox can not select folder and change account

I try to setup a azure web apps to use Dropbox as the source, BUT
1, I can not choose the folder, it force me to create a new folder, when I click the choose folder menu, it only list one which is the name of this new web apps, doesn't showing the other existing folders in my dropbox. But I have some existing folders under the dropbox, which some of them are using by my other web apps.
2 then I try to change the account, go the authorization menu, when I click the Change Account button, it open a new window with http 400 error, with following information:
https://www.dropbox.com/oauth2/authorize?client_id=kiqukvsyjo7cymc&redirect_uri=https%3A%2F%2Fportal.azure.com%2FTokenAuthorize&response_type=code&state=09f09ec2-13d0-4613-97c2-19abdab1957d
Error (400)
It seems the app you were using submitted a bad request. If you would like to report this error to the app's developer, include the information below.
More details for developers
Invalid redirect_uri: "https://portal.azure.com/TokenAuthorize": It must exactly match one of the redirect URIs you've pre-configured for your app (including the path).
.
This used to work very smoothly but seems not working anymore.
Any idea?
It was an issue on the App Service side, caused by the switch over to the v2 Dropbox API. Both issues are now resolved, so you should be able to change the account as well as pick an existing folder.

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 - customErrors="off" in web.config is not displaying detailed errors in Azure app (cloud service)

I have an app deployed to Azure and it uses ADFS (Active Directory Federated Services) for authentication.
When the user tries to navigate to the app on Azure, it redirects the user to the ADFS authentication page. User enters their credentials and clicks OK, and ADFS redirects the user to the landing page of my app.
Everything is working fine up to this point. I'm getting a generic server error on the app once the user hits the landing page. PROBLEM: I need to see the detailed errors. I try setting <customErrors="off" />, repackage my app and redeploy, but that doesn't give me detailed errors:
Here's what I've tried: I've tried packaging my app in Debug mode (after Release mode didn't work), I've edited both web.config's (in the root of the solution, as well as in the Views folder, just to cover all bases). Nothing worked.
What am I doing wrong?
A couple of things to try:
Are you SURE the customerErrors attribute is set correctly? The
Identity and Access tooling in Visual Studio seems to like to reset
that back to "Off" (every time you update via the tool).
Are you able to connect to the role instance via Remote Desktop? If
so, you could inspect the web.config settings for the site?
Browsing to the site from the server might also provide a more
friendly error message.
When you RDP into the cloud service, you can look at the Event
Viewer to see the detailed error messages.
I fixed this error by ftp'ing into my azure website and deleting the wwwroot folder and then publishing my website via visual studio.

Resources